Low-Pri: Stop prepending process.cwd() to file paths in reporter run() functions
- Lingua principale
- JavaScript
- Stelle
- 1.9k
- Fork
- 359
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.