I want to create a unit test for two events, on focus and on blur. I am using vueJS and jest. handleFocus(event) { if (this.blured === true)
I was struggling with a test issue for my custom useLazyQuery hook. My first test is passing but the second one is failing. What am doing wrong for the second t
2 questions in 1 here. Why do I get an error message for my jest.spyOn saying that createMappingsDirectory is not a function? Secondly, I think where I’ve
I'm trying to mock axios.create() because I'm using its instance across the app and obviously need all of its implementation which is destroyed by the mock, thu
I am using typescript with typeorm and i have an repository like this: import { EntityRepository, getRepository, createQueryBuilder } from 'typeorm'; @EntityR
I want to verify that a given array doesn't contain any of a list of values. There is expect.arrayContaining but I don't get how it is supposed to be used for t
Currently I am using automatic imports in my Next.js project, configured by jsconfig.json in the root directory: { "typeAcquisition": { "include": ["jest"
Jest is raising this error on one of my components: Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/fun
I'm testing a component using Vue test utils and Jest and I'm wondering what's the best way to test you are passing the correct values to a child components in
For an angular v12 project which uses jest I just updated jest to version 28. Now, however, I get the following error FAIL src/app/components/update-input/upda
Hi! I'm attempting to write a "simple" test to check for a react class component state change. Specifically, I'm testing if the lat(latitude) and lng(longitu
During unit testing, I am getting undefined error, while executing svelte component with json file. Restaurant.svelte : import data from '../Data/restaurants.js
Is there a way to get a proper error message? when i do $npm test and I intentionally break my code(cough cough remove a line of code) I get this message src/re
so I am trying to test that the onSubmit function is getting triggered if the button is clicked - the way im doing this is through testing the internals of the
The popup has a click away listener which closes it when a click event occurs outside the component. I need to test that the popup has closed. it.only('clicking
I'm trying to add the Bearer in the header section in POST request while testing with Supertest. I tried many methods. I'm a beginner in testing. Please suggest
I am trying to test a react typescript project using jest but it's giving a confusing error: Error image Here is my package.json: "dependencies": { "@testin
Using TDD I'd like to write some new tests that create data in slightly different ways, and verify that that test data gets sanitized down to the same data as a
When I write a react hook component which import '*.png' resource like this: import React, { useState, useEffect } from 'react'; import './topMenu.less'; im
I am doing some Integration tests with jest & nock to test Axios interceptors chaining. In one of them, I am expecting to receive a Blob instance and accord