Sha256: 4caaa400c228fa23b5191f9605f9f129967831b29997d3088c64884d772cc151
Contents?: true
Size: 862 Bytes
Versions: 2
Compression:
Stored size: 862 Bytes
Contents
import { shallow, mount } from 'enzyme'; import { useStrict } from 'mobx'; import { fetch } from './mocks'; import 'jest-enzyme'; // jest.mock('flexboxgrid', () => { // return {}; // }); //useStrict(true); global.shallow = shallow; global.mount = mount; global.fetch = fetch; jasmine.addMatchers({ toHaveRendered() { return { compare: (wrapper, selector) => { const matchCount = wrapper.find(selector).length; const result = { pass: 1 === matchCount }; if (result.pass) { result.message = `${selector} was found`; } else { result.message = `Expected wrapper to contain '${selector}' only once, but it was found ${matchCount} times`; } return result; }, }; }, });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.8.1 | lib/js/jest/setup.js |
lanes-0.8.0 | lib/js/jest/setup.js |