Low-Pri: Stop prepending process.cwd() to file paths in reporter run() functions
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.9k
- Forks
- 359
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
nodeunit is AWESOME. That said: the run() functions for the included reporters prepend process.cwd() to each test module file path; this causes problems in some environments (see below). The current work-around is to use process.chdir(), but it seems like modifying run() to just accept absolute paths would be less confusing.
I work in an environment where we can't always use the nodeunit binary to run our tests (some testing is done on Windows). This means we have our own test runner that manually calls reporter.run(['file1', file2', ...]) with file paths. The tests run on multiple machines, and the node executable isn't always located in the same location. Also, on some Windows machines you have node living in C:\ and tests living in X:\
Currently, our runner has to use process.chdir() to ensure that the paths work on every machine. It seems like it would be a little less confusing, however, if run() didn't try to modify the path and just used whatever it was given. In our case, we'd just "calculate" an absolute path--including the Windows drive, if necessary.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza en los puntos de entrada run() de los reporters incluidos y sigue cómo se gestiona la ruta de cada módulo de prueba. Reproduce el problema llamando a reporter.run() con rutas absolutas, incluidas rutas en distintas unidades de Windows. Se considera terminado cuando los reporters usan las rutas proporcionadas sin requerir process.chdir().
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- testing
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100