You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
365 B
14 lines
365 B
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)
|
|
|