jest-tutorial
jest-tutorial copied to clipboard
🃏《Jest 实践指南》
useDark😄
在jest-setup.ts中使用global报错,修改为globalThis。
基础实践->测试环境->全局Mock->jest-setup.ts中的global,建议修改为globalThis
[这个页面](https://github.yanhaixiang.com/jest-tutorial/intro/why-test/#%E4%BC%98%E5%8C%96%E6%B5%81%E7%A8%8B)
最近在学习单元测试过程中,整理了一篇关于前端单元测试的文章想发在掘金,在介绍Jest使用的时候发现了大佬的文章,可以转载大佬的部分章节到我的文章中吗,我会注明出处的。谢谢大佬。
https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping/ ```js const { pathsToModuleNameMapper } = require('ts-jest') // In the following statement, replace `./tsconfig` with the path to your `tsconfig` file // which contains the path mapping (ie the...
const { compilerOptions } = require('./tsconfig.jsonc') 我发现删除tsconfig里面的全部注释就不报错了,请问一定要这样子吗
