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

Make 'npm test' run on Windows #820

Merged
merged 1 commit into from Jun 28, 2018

Conversation

bzoz
Copy link
Contributor

@bzoz bzoz commented Jun 27, 2018

Uses Node to run the tests. Running make test will still work.

Copy link
Collaborator

@abetomo abetomo left a 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 `);
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok then! Thank you!

@roman-vanesyan roman-vanesyan merged commit 3f4f5ca into tj:master Jun 28, 2018
abetomo added a commit to abetomo/commander.js that referenced this pull request Jun 28, 2018
It becomes unnecessary in the following PR

* Make 'npm test' run on Windows tj#820
abetomo added a commit to abetomo/commander.js that referenced this pull request Jun 28, 2018
It becomes unnecessary in the following PR

* Make 'npm test' run on Windows tj#820
roman-vanesyan pushed a commit that referenced this pull request Jun 28, 2018
It becomes unnecessary in the following PR

* Make 'npm test' run on Windows #820
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.

None yet

3 participants