Questions tagged [jest-circus]

Circus is a flux-based test runner for Jest that is fast, maintainable, and simple to extend.

9 questions
9
votes
2 answers

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

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:…
ysfaran
  • 5,189
  • 3
  • 21
  • 51
5
votes
1 answer

Detox: App has not responded to the network requests below

Running detox 17.4.3 with Jest-Circus as the test runner I am running into the following error using an iOS simulator. detox[18766] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below: (id = -1000) isReady:…
4
votes
1 answer

Jasmine is not define error after using jest-circus

Would like to use jest.retryTimes() & for that I have installed jest-circus however while running test getting jasmine not define error . To achieve above I have added testRunner: "jest-circus/runner" in jest.config.js I am using puppeteer framework…
jayrajkharat
  • 41
  • 1
  • 6
2
votes
1 answer

Detox using jest timeout error: "is assigned to undefined"

I'm trying to add detox using jest and jest-circus to my ReactNative app but I'm currently struggling making it work. Detox, jest and jest-circus have been added from scratch at the latest version. When launching my test, after a successful build,…
Guillaume S.
  • 216
  • 2
  • 7
2
votes
1 answer

TypeError: Expected throat size to be a number but got undefined

I am trying to use the jest-circus runner with jest. Without the runner the tests execute correctly but as soon as i add the line: 'testRunner': 'jest-circus/runner', to my jest config. I see the following error: FAIL migration.test.js ● Test…
1
vote
1 answer

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './build/types' is not defined by "exports" in .../node_modules/jest-circus/package.json

I'm trying to setup detox for e2e testing for my React Native app using jest and jest-circus. I am able to build my iOS app with detox by running detox build --configuration ios but have been unable to run the sample firstTest.e2e.js test with detox…
Rodrigo Veiga
  • 125
  • 1
  • 1
  • 8
1
vote
0 answers

Jest: thrown previous Promise rejection when testing Promise

My Jest tests keep showing thrown: "I-failed" when I test promises. Here is the code: test('testing variable is Promise', () => { const rejectPromise = Promise.reject('I-failed') expect(rejectPromise instanceof…
FlyC
  • 1,844
  • 1
  • 15
  • 18
0
votes
0 answers

Ensuring a sandboxed mock refers to the same module instance as the Jest environment already has loaded

This is a bit hairy, so bare with me for a second :) Our Jest environment, custom-env, requires a module A and sets adds a function to the global scope using this.global.getBar = A.getBar. The custom environment is used by a test. This test has a…
oligofren
  • 20,744
  • 16
  • 93
  • 180
0
votes
0 answers

how to make a jest test fail at first time even using jest.retryTimes?

in my Jest test suite, i use jest.retryTimes(4) because of the particular and instable architecture of the software. And this works as expected. There are some test that must to pass at the first time so for these particular test i need to…
Andrea Bisello
  • 1,077
  • 10
  • 23