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

269
Views
Cómo ejecutar pruebas de broma en una carpeta en particular

Quiero que el siguiente comando de secuencia de comandos tenga algo como dónde debería ejecutar las pruebas en ese nombre de carpeta

 "scripts": { "test": "jest --testPathPattern==tests/<folder-name> --maxWorkers=2" },

para ejecutar pruebas en una carpeta en particular.

Este comando se ejecuta en un archivo bash run-tests.sh como se muestra a continuación

 #!/bin/bash npm run test

¿Es posible tener algo como

 #!/bin/bash npm run test <folder-name>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

De acuerdo con la documentación de broma, deberías poder hacer esto:

 npm run test -- --testPathPattern==tests/<folder-name>

fuente: https://jestjs.io/docs/cli#using-with-npm-scripts

Alternativamente, algo como esto en su script bash también debería funcionar:

 #!/bin/bash pushd <directory here> # Basically cd into that directory npm run test popd # cd back into where we came from when we ran pushd

Creo que esto hará lo que estás pidiendo.

about 4 years ago · Juan Pablo Isaza 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!