1 Star 0 Fork 62

guocm/joplin_1

forked from Gitee 极速下载/joplin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jest.base-setup.js 828 Bytes
一键复制 编辑 原始数据 按行查看 历史
/* eslint-disable jest/require-top-level-describe */
module.exports = () => {
// Disable the additional information that Jest adds to each console
// statement. It's rarely needed and if it is it can be commented out here.
const jestConsole = console;
beforeEach(() => {
global.console = require('console');
});
afterEach(() => {
global.console = jestConsole;
});
};
// jsdom extensions
if (typeof document !== 'undefined') {
// Prevents the CodeMirror error "getClientRects is undefined".
// See https://github.com/jsdom/jsdom/issues/3002#issue-652790925
document.createRange = () => {
const range = new Range();
range.getBoundingClientRect = jest.fn();
range.getClientRects = () => {
return {
length: 0,
item: () => null,
[Symbol.iterator]: jest.fn(),
};
};
return range;
};
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gchm2010/joplin_1.git
git@gitee.com:gchm2010/joplin_1.git
gchm2010
joplin_1
joplin_1
dev

搜索帮助