Browse Source
Reorganise test suite so that unit tests are cleanly separate from e2e tests. Update tests to make better use of our custom module resolves.renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
28 changed files with 31 additions and 50 deletions
@ -1,5 +0,0 @@ |
|||||
describe('description', () => { |
|
||||
it('should have description', () => { |
|
||||
expect(1 + 2).toBe(3) |
|
||||
}) |
|
||||
}) |
|
@ -1,14 +0,0 @@ |
|||||
const spawn = require('cross-spawn') |
|
||||
const path = require('path') |
|
||||
|
|
||||
const s = `\\${path.sep}` |
|
||||
const pattern = |
|
||||
process.argv[2] === 'e2e' |
|
||||
? `test${s}e2e${s}.+\\.spec\\.js` |
|
||||
: `test${s}(?!e2e${s})[^${s}]+${s}.+\\.spec\\.js$` |
|
||||
|
|
||||
const result = spawn.sync(path.normalize('./node_modules/.bin/jest'), [pattern], { |
|
||||
stdio: 'inherit' |
|
||||
}) |
|
||||
|
|
||||
process.exit(result.status) |
|
@ -1,4 +1,4 @@ |
|||||
import balanceReducer, { GET_BALANCE, RECEIVE_BALANCE } from '../../app/reducers/balance' |
import balanceReducer, { GET_BALANCE, RECEIVE_BALANCE } from 'reducers/balance' |
||||
|
|
||||
describe('reducers', () => { |
describe('reducers', () => { |
||||
describe('balanceReducer', () => { |
describe('balanceReducer', () => { |
@ -1,4 +1,4 @@ |
|||||
import formReducer, { SET_FORM_TYPE } from '../../app/reducers/form' |
import formReducer, { SET_FORM_TYPE } from 'reducers/form' |
||||
|
|
||||
describe('reducers', () => { |
describe('reducers', () => { |
||||
describe('formReducer', () => { |
describe('formReducer', () => { |
@ -1,4 +1,4 @@ |
|||||
import infoReducer, { GET_INFO, RECEIVE_INFO } from '../../app/reducers/info' |
import infoReducer, { GET_INFO, RECEIVE_INFO } from 'reducers/info' |
||||
|
|
||||
describe('reducers', () => { |
describe('reducers', () => { |
||||
describe('infoReducer', () => { |
describe('infoReducer', () => { |
Loading…
Reference in new issue