2018-11-08 09:15:56 +00:00
|
|
|
import consola from 'consola'
|
|
|
|
import chalk from 'chalk'
|
2018-12-23 08:40:36 +00:00
|
|
|
import env from 'std-env'
|
2019-03-16 12:42:35 +00:00
|
|
|
import exit from 'exit'
|
2018-11-08 09:15:56 +00:00
|
|
|
|
2019-01-29 11:29:55 +00:00
|
|
|
const isWin = env.windows
|
|
|
|
|
|
|
|
describe.win = isWin ? describe : describe.skip
|
|
|
|
test.win = isWin ? test : test.skip
|
|
|
|
|
|
|
|
describe.posix = !isWin ? describe : describe.skip
|
|
|
|
test.posix = !isWin ? test : test.skip
|
2018-09-13 09:07:34 +00:00
|
|
|
|
2018-11-08 09:15:56 +00:00
|
|
|
chalk.enabled = false
|
|
|
|
|
2018-08-16 15:46:42 +00:00
|
|
|
jest.setTimeout(60000)
|
2018-11-08 09:15:56 +00:00
|
|
|
|
|
|
|
consola.mockTypes(() => jest.fn())
|
2019-03-16 12:42:35 +00:00
|
|
|
|
|
|
|
function errorTrap(error) {
|
|
|
|
process.stderr.write('\n' + error.stack + '\n')
|
|
|
|
exit(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
process.on('unhandledRejection', errorTrap)
|
|
|
|
process.on('uncaughtException', errorTrap)
|