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
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