Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

291
Views
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 from './IncrementalSearchActions';

describe('Incremental Search Actions', () => {
    it('Should create an incremental search action')
});

The questions/confusions I have around this are

  1. I get an error saying describe is not defined, how do I import the reuqired module?
  2. Is this supposed to be used with Karma/Jasmine?
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I believe the answer here is the answer to your question.

TL;DR;:

add the following to your .eslintrc file:

"env": {
    "jest": true
}
over 4 years ago · Santiago Trujillo Report

0

Are your test files under a the "test" folder? make sure jest is install properly and listed on your package.json and under scripts have:

"test": "jest --coverage",

you can run the script with npm test

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!