Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

474
Vistas
Odin project and running jest on Windows : how to run single test in VS code

I am working on the Odin project and I have arrived at the test driven part. I am on windows, installed everything as instructed and I use VS code as my IDE.

Now, I use VS code debugger to run the tests i.e. for the first case hello world I run the debugger on the helloWorld.spec.js file.

The tests runs as expected ... but in fact it runs all the 14 tests not only the one I am working on. As I am curious to understand how it works I would like to succeed running only the test I am working on.

I searched on Google but I couldn't find an answer that make my quest a success.

Do you know how to achieve this ? My configuration is shown herebelow.

  1. First, my structure :

directory structure

  1. Then, my debug config file
     "version": "1.0.0",
     "configurations": [
       {
         "type": "node",
         "request": "launch",
         "name": "Jest: current file",
         //"env": { "NODE_ENV": "test" },
         "program": "${workspaceFolder}/node_modules/.bin/jest",
         "args": ["--runInBand", "--no-cache", "--watchAll=false"],
         "console": "integratedTerminal",
         "disableOptimisticBPs": true,
         "windows": {
           "program": "${workspaceFolder}/node_modules/jest/bin/jest"
         }
       }
     ]
   }
  1. I also installed jest extension in VS code, in the hope to solve my issues and here are the settings for that extension :
    "jest.autoRun": {
        "watch": false,
        "onSave": "test-src-file",
        "onStartup": [
          "all-tests"
        ]
      },
      "jest.debugCodeLens.showWhenTestStateIn": [
        "pass",
        "fail",
        "unknown"
      ],
      "jest.coverageFormatter": "GutterFormatter",
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda