Initial commit
This commit is contained in:
37
frontend/webapp/node_modules/eslint-plugin-jsx-a11y/__mocks__/JSXElementMock.js
generated
vendored
Normal file
37
frontend/webapp/node_modules/eslint-plugin-jsx-a11y/__mocks__/JSXElementMock.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import type { JSXAttributeMockType } from './JSXAttributeMock';
|
||||
|
||||
export type JSXElementMockType = {
|
||||
type: 'JSXElement',
|
||||
openingElement: {
|
||||
type: 'JSXOpeningElement',
|
||||
name: {
|
||||
type: 'JSXIdentifier',
|
||||
name: string,
|
||||
},
|
||||
attributes: Array<JSXAttributeMockType>,
|
||||
},
|
||||
children: Array<Node>,
|
||||
};
|
||||
|
||||
export default function JSXElementMock(
|
||||
tagName: string,
|
||||
attributes: Array<JSXAttributeMockType> = [],
|
||||
children?: Array<Node> = [],
|
||||
): JSXElementMockType {
|
||||
return {
|
||||
type: 'JSXElement',
|
||||
openingElement: {
|
||||
type: 'JSXOpeningElement',
|
||||
name: {
|
||||
type: 'JSXIdentifier',
|
||||
name: tagName,
|
||||
},
|
||||
attributes,
|
||||
},
|
||||
children,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user