1 Star 0 Fork 0

Cloudy/core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.setup.base.js 721 Bytes
一键复制 编辑 原始数据 按行查看 历史
const { TextEncoder, TextDecoder } = require('util');
// Do not log message on GitHub Actions.
// Because these logs will affect the detection of real problems.
const _console = global.console;
global.console = process.env.CI
? {
info: () => {},
console: () => {},
warn: () => {},
error: () => {},
log: () => {},
time: () => {},
timeEnd: () => {},
}
: _console;
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
process.on('unhandledRejection', (error) => {
_console.error('unhandledRejection', error);
if (process.env.EXIT_ON_UNHANDLED_REJECTION) {
process.exit(1); // To exit with a 'failure' code
}
});
process.env.IS_JEST_TEST = true;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/itcloudy/core.git
git@gitee.com:itcloudy/core.git
itcloudy
core
core
main

搜索帮助