I have a React-native project with AWS Amplify. In the root directory, there is an amplify folder. Inside this amplify folder, there is a backend folder, an
I have a React-native project with AWS Amplify. In the root directory, there is an amplify folder. Inside this amplify folder, there is a backend folder, an
Jest not implemented for window.open, getting error on the console but unit test is getting pass with console error a.ts file myFun(){ window.open('https://
Jest not implemented for window.open, getting error on the console but unit test is getting pass with console error a.ts file myFun(){ window.open('https://
I am trying to ensure that the right value is copied to the users clipboard when they click a button. This is my copy method. I am using a ref on the input to a
I have below code in react. useEffect(() => { (async () => { await httpClient .get(`${config.resourceServerUrl}/invent
I want to test a node API using Jest. I am testing the routes and websockets. Testing the routes was no problem. I simply started the server using the setupFile
Creating a jest test like: test("btoa", () => { expect(btoa("aaa")).toStrictEqual("YWFh"); }); fails with ReferenceError: btoa is not defined however, no
In my case I have a test file containing a few hundred tests using jest describe('my test-suite', () => { test('test 1', () => { expect(1).toBe(
search looks like this search: "?productId=1234" and changeId is action const urlParams = new URLSearchParams(window.location.search); const productId = urlP
I have error in the following below test. My node version is : v12.10.0. is there any alternative of setTimeout? test('demo code', async () => {
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