Top "Jestjs" questions

Jest is a JavaScript unit testing framework made by Facebook based on Jasmine and provides automated mock creation and a jsdom environment.

How to Unit Test a Method in a Vue.js Component using jest

I'm trying to unit test a component method. The question here does not lay out how to access the component …

unit-testing vue.js vuejs2 jestjs vue-test-utils
error 'document' is not defined : eslint / React

I'm building a React app, with create-react-app. I got the following error when running ESLint: 8:3 error 'document' is not defined …

reactjs jestjs jsx jsdom
Jest test fails with window is not defined

I am trying to get started with state of the art web development learning React/Redux. Right now I am …

webpack jestjs yarnpkg
Testing anonymous function equality with Jest

Is there a way to test anonymous function equality with jest@20? I am trying to pass a test similar to: …

javascript node.js unit-testing jestjs equality
Jest looping through dynamic test cases

How do I loop through dynamic test cases in Jest? I have test cases like the following how do I …

javascript node.js unit-testing jestjs
Test a React Component function with Jest

Original First of all, I am following the Flux architecture. I have an indicator that shows a number of seconds, …

javascript reactjs reactjs-flux jestjs
How to query by text string which contains html tags using React Testing Library?

Current Working Solution Using this html: <p data-testid="foo">Name: <strong>Bob</strong> <…

reactjs unit-testing jestjs react-testing-library
Using jest in my react app, describe is not defined

I am new to jest and trying to figure out some basic stuff in my following code import * as actions …

reactjs jestjs eslint eslintrc
Jest won't transform the module - SyntaxError: Cannot use import statement outside a module

I couldn't get rid of this SyntaxError: Cannot use import statement outside a module error no matter what I have …

typescript jestjs babel-jest ts-jest
react-testing-library why is toBeInTheDocument() not a function

Here is my code for a tooltip that toggles the CSS property display: block on MouseOver and on Mouse Out …

reactjs unit-testing jestjs react-testing-library