jest-circus

Accessing jasmine with testRunner set to jest-circus results in: ReferenceError: jasmine is not defined

Deadly 提交于 2021-02-11 06:27:51
问题 On default jest allows you to simply access jasmine globally. But as soon as you switch the testRunner to jest-circus , jasmine is undefined. Following is a minimal, reproducible example: babel.config.js module.exports = { presets: [["@babel/preset-env", { targets: { node: "current" } }]], }; jasmine.spec.js it("check jasmine", () => { console.log(jasmine); }); jest.config.js module.exports = { rootDir: ".", testRunner: "jest-circus/runner", }; package.json { "name": "test-jest", "version":