Tests are working with coverage
This commit is contained in:
parent
2471e10346
commit
a64bee9f83
10
packages/instant/jest.config.js
Normal file
10
packages/instant/jest.config.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
module.exports = {
|
||||||
|
roots: ['<rootDir>/test'],
|
||||||
|
coverageDirectory: 'coverage',
|
||||||
|
transform: {
|
||||||
|
'.*.tsx?$': 'ts-jest',
|
||||||
|
},
|
||||||
|
testRegex: '(/__test__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
|
||||||
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||||||
|
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/index.tsx'],
|
||||||
|
};
|
13
packages/instant/test/components/zero_ex_instant.test.tsx
Normal file
13
packages/instant/test/components/zero_ex_instant.test.tsx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { configure, shallow } from 'enzyme';
|
||||||
|
import * as Adapter from 'enzyme-adapter-react-16';
|
||||||
|
import * as React from 'react';
|
||||||
|
|
||||||
|
configure({ adapter: new Adapter() });
|
||||||
|
|
||||||
|
import { ZeroExInstant } from '../../src';
|
||||||
|
|
||||||
|
describe('<ZeroExInstant />', () => {
|
||||||
|
it('shallow renders without crashing', () => {
|
||||||
|
shallow(<ZeroExInstant />);
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user