Question is exactly same here in fact but has different context: How to mock not installed npm package in jest? I am part of a project where new Module Federati
skipped test When pressing debug on the test it just skips it. It works for other tests in different repositories that I have, but for this specific one it does
I'm trying to update my NodeJS12 & TypeScript app to Node16, one if the reasons is the need to use top-level-awaits. The code compiles correctly after the u
I'm having this issue when test react-native component with jest and enzyme TypeError: _enzymeAdapterReact.default is not a constructor Here is my dev dependen
The second expect(fs.writeFile).toHaveBeenCalledTimes(1) (in describe('Guid for MPX') returns an error because the writeFile has been called twice. In theory, j
i need to cover my code with some unit tests and in one of then i have the following situation. app.tsx async someMethod( . . . windo
I'm trying to test my backend's methods (to check users quota, like if they can use the app) and I have some trouble with a specific one. Indeed I have a functi
I remake browser version of TacticToy game with React, and during unit-tests writing I've got a problem: there is no full traceback of a custom exception, only
I need to test a function that write a file from local path to remote path on an sftp machine using shh2-sftp-client library. my own function is the following:
I have a set of tests for the functions in an ES6 class that use $.get(). I was able to mock $.get(). I'm working on testing another function in the same class
Login.js import {useSelector, useDispatch } from 'react-redux'; import Header from './Header'; import {submitForm, handleChange} from '../actions/authenticati
We are using jest 27 for our project in Angular 12 for running our unit tests. Locally, these tests run correctly but runnig them in a cloud agent pipe they bre
//write the test case got this error when i am using shallow its working fine but not gent expect value do you have any solutin please help to me import React f
Registration on the site consists of three stages. The first step is to provide a name, email address. When you submit the form of the first step, you are redir
I have two suites of tests, one for Accounts and one for Transactions, accounts.spec.js and transactions.spec.js. I'm also using supertest. When I run them in j
Here's the current state of my setup and tear down methods: beforeAll(async () => { // await populate(); try { await client.connect(() =>
I'm currently having an issue with Jest and Typescript inside a Lerna mono repo. Inside the test file, I've imported the component import { Doctor } from '../sr
The tests in my Nx Angular 10 repo have been running very slow so I decided to switch from using jest-ts to @swc/jest. jest.presets.ts const nxPreset = require(
I have tests from an angular 12 project that work just fine. I've upgraded the project to angular 13 and now they don't work. This is my test file: import { Com
I want to use Import/export feature of ES6 modules (since my entire project uses that) with Jest 26.1.0. I have created a directory for my test cases called tes