Nuxt/test/utils/setup-env.js
pooya parsa c5a4465572
feat: static target DX improvements (#7712)
[release]

Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
Co-authored-by: pimlie <pimlie@hotmail.com>
2020-07-16 17:10:54 +02:00

24 lines
523 B
JavaScript

import consola from 'consola'
import env from 'std-env'
import exit from 'exit'
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
jest.setTimeout(60000)
consola.mockTypes(() => jest.fn())
function errorTrap (error) {
process.stderr.write('\n' + error.stack + '\n')
exit(1)
}
process.on('unhandledRejection', errorTrap)
process.on('uncaughtException', errorTrap)