Skip to content

Fix a bug about nodeunit cannot open absolute path#214

Open
Kuniwak wants to merge 1 commit intocaolan:masterfrom
Kuniwak:fixAbsPathBug
Open

Fix a bug about nodeunit cannot open absolute path#214
Kuniwak wants to merge 1 commit intocaolan:masterfrom
Kuniwak:fixAbsPathBug

Conversation

@Kuniwak
Copy link

@Kuniwak Kuniwak commented Jun 20, 2013

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.

fix a bug that is happen when nodeunit try to test a file has 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.
@user24
Copy link

user24 commented Sep 3, 2013

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants