Used addListener from navigation like this, useEffect(() => { const navigationSubscription = props.navigation.addListener( "willFocus", () => setFo
I'm trying to use __mocks__. src/shared/state/use-some-state.ts export const useSomeState = () => { return { value: 6 }; } which is exported from an index
I wrote some nodejs codes to be evaluated by a particular test file, candidate.test.js but surprisingly the test keeps failing. Below is the error I am getting:
Get request method in tasks.js file const { Task } = require('../model/Tasks.js') const asyncWrapper =require('../middleware/async') const getTask = asyncWrapp
I want to profile a Jest test, but I only want to see the behavior for some specific methods. In ruby, I can do that with ruby-prof, but is there an equivalent
I would like some assistance in resolving this error. Am using Jest V28.0.0. Here's how my package.json's test script & devDependencies look like "scri
I'm getting the following error when running a test in Jest, using Angular 13: Unexpected value 'NgxsRootModule' imported by the module 'DynamicTestModule'. Pl
using nestjs framework and with a repository class that uses mongoose to do the CRUD operations we have a simple users.repository.ts file like this: @Injectable
I have an issue in my tests that flag up a window variable as undefined. But I don't know where in the setupTests.tsx, I would need to define it. So far the var
I am using Jest in a Next.js 12 App with the Rust Compiler. Since I'm using WebWorkers I have a file in which I use import.meta.url. to construct the worker The
After updating to React 18 or creating a new React 18 app from create-react-app, when I run the yarn test command, it gives a console.error as a Warning for eac
I have several tests written with Jest and React Testing Library. They all mock fetch and use a userEvent.click call to fire a submit button which makes a fetch
If I run the tests with jest, I got always the error message TypeError: this.subQuery is not a function with a reference on the marked line in the testModelDb.t
Has anyone successfully upgraded to latest Jest version 28.0.0? I'm receiving an error: Error: Test environment jest-environment-jsdom cannot be found. Make sur
Hello I am not sure what is wrong with installing Jest. https://jestjs.io/docs/getting-started But here is my issue with my terminal. Please help. I am new to t
I just can't figure out, how I'm supposed to mock / get data from scrollHeight, scrollWidth, clientHeight and clientWidth in test. For better introduction, my t
I created an app within a monorepo (Lerna) using yarn workspace. The architecture of the app is as follow: my-monorepo ├── node_modules ├
I'm trying to upgrade my project to React 18, everything works in dev and production mode in the browser. But after upgrading to the latest version of @testing-
Swiper 8 and Jest (support ESM) Must use import to load ES Module enter image description here enter image description here How we can solve if I need to keep s
I'm trying to run a for loop within a Puppeteer test that sends values to a search bar: test('test one', () => { var results = [""] var fuzz = ['ap