Tests are working with coverage

This commit is contained in:
fragosti 2018-10-02 13:29:14 -07:00
parent 2471e10346
commit a64bee9f83
2 changed files with 23 additions and 0 deletions

View 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'],
};

View 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 />);
});
});