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

163
Views
¿Por qué `require` funciona localmente pero no en CI?

Estoy tratando de usar jest.axe en mi aplicación de reacción muy básica (creada por create-react-app). Localmente, esto pasa muy bien con la yarn test

 const {axe, toHaveNoViolations} = require('jest-axe') expect.extend(toHaveNoViolations) ... const {container} = render(<App/>) const results = await axe(container) expect(results).toHaveNoViolations()

Sin embargo, en mi tubería de acciones de github aparece el siguiente error

 Cannot find module 'jest-axe' from 'src/App.test.tsx' 3 | import App from './App'; 4 | > 5 | const {axe, toHaveNoViolations} = require('jest-axe')

Archivo de acciones

 name: Run Unit Tests on: [push] jobs: Run-Unit-Tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install dependencies run: yarn install --frozen-lockfile - name: Run tests id: run-tests run: CI=true yarn test

Mi archivo yarn.lock tiene jest.axe.

Intenté import { axe, toHaveNoViolations } from "jest-axe"; en mi archivo de prueba pero luego falla localmente:/

about 4 years ago · Santiago Trujillo
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!