Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged jestjs

0 votes
929 views
1 answer
    I keep getting "localStorage is not defined" in Jest tests which makes sense but what are my options? Hitting brick walls. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
900 views
1 answer
    I have MyComponent.tsx that uses constants.ts module in order to do something based on the IS_IOS constant: import ... a-constant-property-from-a-module-for-a-specific-test-group...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I want to test Vibration module of react-native, the problem is that I get an error when I try to test ... ://stackoverflow.com/questions/65848268/how-to-test-react-native-methods...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I'm running a React Native project where I'm testing custom hooks written with react-query. I'm using Jest, ... -how-to-call-mutate-from-custom-usemutation-hook-in-jest-test...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
703 views
1 answer
    I'm writing unit tests with Jest trying to test a module which uses FS. The module file: import fs from ' ... /jest-getting-error-when-mocking-fs-modules-and-calling-config-module...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.8k views
1 answer
    Problem: Would someone help me figure out how to mock fs with jest using typescript? I've tried a few ... -mock-fs-with-jest-using-typescript-property-mockreturnvalue-does-not...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Inside my ./src/app/global-team folder, there are a-z folders. I want to set my threshold level ... .com/questions/65894304/jest-coveragethreshold-glob-exclude-some-sub-folders...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
853 views
1 answer
    I am using jest to write unit test for my javascript functions (running with nodejs), I am very new to ... no-environment-is-configured-problem-when-import-a-javascript-file-which...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
659 views
1 answer
    I have a typescript project that I'm using TDD I have a test doesn't not pass I don't know how ... ://stackoverflow.com/questions/65911417/test-doesnt-pass-project-using-typescript...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I struggle testing a callback function with Jest. Here is the function, simplified, taken from a NestJS project: ... -async-callback-function-is-not-called-the-original-is-jest...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
714 views
1 answer
    I'm writing a test in jest for a module which uses a constant from a different module. I want to set ... .com/questions/65917738/jest-resetting-value-in-module-and-reloading-import...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I'm trying to mock a function and use the benefits from Typescript but I can't find the best way to do ... /questions/65602161/how-to-cast-properly-a-mock-function-with-typescript...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
801 views
1 answer
    I have a working example with Jest and mocks from __mocks__ directory that works : With simple Jest setup // ... /create-react-app-doesnt-properly-mock-modules-from-mocks-directory...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
971 views
1 answer
    I recently started writing end to end tests using Playwright and Jest packages. In a test I would like to ... -console-messages-and-response-status-codes-in-playwright-and-jest...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    Some of the code I am trying to test detects the platform, using, e.g.: import { Platform } from ' ... .com/questions/43161416/mocking-platform-detection-in-jest-and-react-native...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    When using jest.fn() to add a mock you can usually access the .mock property to access details such as ... /questions/52457575/jest-typescript-property-mock-does-not-exist-on-type...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
915 views
1 answer
    Is there a way to use node-inspector to debug unit tests with Jest? It would be nice to step ... .com/questions/25142173/debugging-jest-test-cases-using-node-inspector...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    beforeEach(async () => { const sandbox = sinon.sandbox.create() ... }) test('/add', () => { // ... /questions/52397708/how-to-pass-variable-from-beforeeach-hook-to-tests-in-jest...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    beforeEach(async () => { const sandbox = sinon.sandbox.create() ... }) test('/add', () => { // ... /questions/52397708/how-to-pass-variable-from-beforeeach-hook-to-tests-in-jest...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
932 views
1 answer
    Having difficulty with generating Jest coverage reports for all committed files in my create-react-app. Initially, code ... -reporting-on-all-committed-files-in-create-react-app...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I am using create-react-app. Running jest from the CLI causes this error (though in VS Code it shows in my ... -react-app-and-jest-cannot-use-import-statement-outside-a-module...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
835 views
1 answer
    Having difficulty with generating Jest coverage reports for all committed files in my create-react-app. Initially, code ... -reporting-on-all-committed-files-in-create-react-app...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I am using create-react-app. Running jest from the CLI causes this error (though in VS Code it shows in my ... -react-app-and-jest-cannot-use-import-statement-outside-a-module...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I have been trying to set up server-side testing for my application but have run into an issue with bamboo ... set up server-side testing separately in the .bamboorc file...
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Jest doesn't type some of its expect functions in Matchers. For example, it doesn't generate compiling errors for following ... and won't pass any way? Backward compatible? etc....
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
837 views
1 answer
    enter image description here here is jest.config.js enter image description here what is the error means, i can't ... my project, find nothing abound the function. please help me....
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
938 views
1 answer
    Below is a simplified snippet from my azure build pipeline: - task: Npm@1 name: ReactTests continueOnError: true inputs: ... so I'm surprised I can't find similar questions....
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I'm trying to unit test some sass functions with dart-sass and sass-true via jest. The node version I am ... file or directory Does anybody have a solution for this behavior?...
asked Feb 19, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...