npm test targets for win and unix
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 605
- Forks
- 157
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
So as part of the process of running modules on Windows, we're running into some issues as the npm test command on many modules is Unix specific.
I can see three possible solutions to this problem:
- Work out what commands tests should be using, by finding something that works with Windows and Unix. Raise PRs against the modules to get them to update their test targets. If anyone is using bash-specific test scripts, encourage them to use Node scripts instead.
- Work out a different command and npm target (e.g.
npm run-script test-win) for windows, raise PRs against the modules adding this command. - Give up and use Git bash (to the extent that this actually resolves the issues).
I'd say 3 is the least work (and it's what we're doing at the moment), but Git bash isn't officially supported by Node for windows, so it's probably not the best way to go.
1 would be the ideal solution, the question is whether there is a standard npm test command that can be used. For npm itself, @iarna suggested this (option 1), which works on windows, but then later suggested this (option 2), which is a separate windows command.
Would love to hear views from someone who's had to deal with this before on how to proceed with this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Windows-compatible test commands discussed in the linked Node and npm pull requests, then inspect the npm test targets used by the affected modules. Done means establishing and applying a documented approach that runs module tests on both Windows and Unix without relying on Git Bash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- operating-systems, testing-qa, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100