npm run test on Windows fails
Open
Nobody has claimed this yet.
bug
info needed
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
What type of issue is this?
Infrastructure issue
What is the issue?
This is the error in cmd prompt:
> @mdn/browser-compat-data@7.3.0 unittest
> NODE_ENV=test c8 mocha index.test.ts --require tsx --recursive "{,!(node_modules)/**}/*.test.ts"
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
What behavior were you expecting?
Being able to run tests.
What version(s) of BCD is the issue present in?
- The current BCD release
- The current version of the
mainbranch
Do you have anything more you want to share?
No response
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 with the unittest command shown in the issue and inspect how it is defined for npm. Run the command from Windows cmd and compare it with the current test entry point using index.test.ts, tsx, c8, and mocha. Done means the test suite starts successfully on Windows without the NODE_ENV command error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, shell, typescript
- Domain
- build-system, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100