I'm using Jest to test my Angular app (using Nx workspaces). I have a component that uses a service that I'm trying to mock. Here's the code: myDummyService.per
I'm trying to create a simple test with nestjs, and I'm get this error Test functions cannot both take a 'done' callback and return something. Either use a 'do
I'm trying to write a test that checks if request body does not have proper data, it should return an error, and the status code should be 400. Which I think is
I am new to learning jest mocks. I am trying out a very simple test. I have a folder greeter. This folder has a file 'greeter.js' and a subfolder called 'test'.
I have an API class that I am trying to use in a React app. // API file class API { ... } export default API; // Other file import API from "utils/API"; con
How would one test an express route such as app.get('/myapp/:parameter') How would I use jest to test that no parameter was passed? I have an error that will re
I'm trying to build a mobile application with typescript, react-native, expo and jest. When I'm trying to run tests: FAIL src/components/Button/tests/Button.t
I have this component, which uses react-chartjs-2 to render a Doughnut chart: const CompliancyChart = ({data}): JSX.Element => { ... return ( <Cha
const express = require('express'); const router = express.Router(); const Product = require('./../model/product'); router .route('/api/product') .get(async
My test passes but has a console refrenceError: You are trying to access a property or method of the Jest environment after it has been torn down. Test: import
I'm using React+JEST to test an existing component. It has a function filterDeliveries like so : const filterEmptyDeliveries = (arr): Promise<string[] | neve
I have Serverless application (node:14.19.1-bullseye-slim) with almost 400 tests. There are mostly functional tests with using of local DynamoDb. The problem is
I'm writing some jest tests to test an async method. If I run each test individually, it works! However, when I run the whole suite, they fail. The mock values
I am trying to create a test with jest and I want to use done() callback but Typescript is not accepting it, I tried to use type any, jest.DoneCallback or leavi
I'm getting these warnings when I run my expo / jest project and I'm not sure why, seemed to not come up when googled. console.warn The "EXNativeModulesProx
I'm testing a Vue component but I'm having trouble testing a button's disabled state. How can I access a button's disabled status in my tests? I've tried using
I am getting "jest-config" package from the "jest" npm package directory error when I try to run e2e test for android application, I am using detox test -c a
I've moved a load of helper methods into a npm published library, but some of them are being mocked in the unit tests and I can't figure out how to mock the new
I'm now trying to test a simple React class context that is used to sets a currency to the global state. However, I didn't know how to to consume the context in
I'm using the Select component from patternfly and attempting to do a test that involves making changes to the selection. I feel like I'm in a catch 22 as I can