Nuxt/test/utils/setup.js
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

27 lines
572 B
JavaScript

import consola from 'consola'
import chalk from 'chalk'
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
chalk.enabled = false
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)