UNPKG

@tachui/devtools

Version:

Development & debugging tools for tachUI framework

48 lines (47 loc) 1.09 kB
const ComponentTester = { create: (component) => ({ withProps: function(props) { return ComponentTester.create({ ...component, props: { ...component.props, ...props } }); }, withMocks: function(mocks) { return ComponentTester.create({ ...component, mocks }); }, withBreakpoint: function(breakpoint) { return ComponentTester.create({ ...component, breakpoint }); }, withTheme: function(theme) { return ComponentTester.create({ ...component, theme }); }, test: (name, fn) => { console.log(`Running test: ${name}`); fn(component); } }) }; const MockProvider = { create: (mocks) => mocks }; const SnapshotTester = { create: (_config) => ({ snapshot: (name, _component) => { console.log(`Creating snapshot: ${name}`); } }) }; const A11yTester = { create: (_config) => ({ test: (_component) => { console.log("Running accessibility tests"); } }) }; export { A11yTester, ComponentTester, MockProvider, SnapshotTester }; //# sourceMappingURL=index.js.map