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
Make 'npm test' run on Windows #820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
readdirSync(__dirname).forEach((file) => { | ||
if (!file.startsWith('test.') || extname(file) !== '.js') | ||
return; | ||
process.stdout.write(`\x1b[90m ${file}\x1b[0m `); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Windows support ANSI colors in terminal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Win10 terminal control sequences are supported natively by the console. For previous Windows versions Node (libuv to be more precise) has special emulation layer that translates the codes to winapi calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok then! Thank you!
It becomes unnecessary in the following PR * Make 'npm test' run on Windows tj#820
It becomes unnecessary in the following PR * Make 'npm test' run on Windows tj#820
Uses Node to run the tests. Running
make test
will still work.