Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug about nodeunit cannot open absolute path #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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