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

345
Views
Jest está dando SyntaxError: Token inesperado '.'

Estoy tratando de probar mi componente React en el que he importado un archivo css como este

 import styles from "./NavBar.module.css"

El conjunto de pruebas Jest no se ejecuta

 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){.nav { ^ SyntaxError: Unexpected token '.' import styles from "./NavBar.module.css";

Parece que jest no entiende los archivos css. ¿Hay una solución?

mi paquete.json

 { "name": "client", "version": "1.0.0", "description": "", "scripts": { "test": "jest", "dev": "parcel watch index.html", "build": "npm install --include=dev && npm run build:parcel", "build:parcel": "parcel build index.html" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "@babel/preset-env": "^7.17.10", "@babel/preset-react": "^7.16.7", "babel-jest": "^28.0.3", "buffer": "^6.0.3", "jest": "^28.0.3", "jest-babel": "^1.0.1", "jest-environment-jsdom": "^28.0.2", "parcel": "^2.5.0", "process": "^0.11.10" }, "dependencies": { "axios": "^0.27.2", "firebase": "^9.7.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-router-dom": "^6.2.2" }, "babel": { "presets": [ "@babel/preset-react", "@babel/preset-env" ] }, "jest": { "testEnvironment": "jsdom" } }
about 4 years ago · Juan Pablo Isaza
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!