nodeunit icon indicating copy to clipboard operation
nodeunit copied to clipboard

Fix a bug about nodeunit cannot open absolute path

Open Kuniwak opened this issue 12 years ago • 1 comments

Fix a bug that is happen when nodeunit try to test a file by the absolute path.

path.join(process.cwd(), filename) is a code in some reporters does not work when the filename is absolute. Instead use path.resolve, and it works with an absolute file name.

Kuniwak avatar Jun 20 '13 20:06 Kuniwak

confirmed;

$ cd -
/Users/howardyeend/Sites/
$ nodeunit /Users/howardyeend/Desktop/test.js

/usr/local/lib/node_modules/nodeunit/lib/nodeunit.js:72
        if (err) throw err;
                       ^
Error: ENOENT, stat '/Users/howardyeend/Sites/Users/howardyeend/Desktop/test.js'

user24 avatar Sep 03 '13 07:09 user24