question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'npm run test' not working on windows

See original GitHub issue

Win 10 x64 node: 4.4.7. I have also tried with node 6.3.1. (current)

It seems that mocha freezes when running the tests. All I get is

webpack-validator@ test E:\webpack-validator
cross-env NODE_ENV=test mocha "src/**/*.test.js"
  ......................................

and then it hangs forever. I am really not sure if it is a problem in the scripts or mocha itself. Help would be really appreciated…

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nyrosmithcommented, Aug 11, 2016

After some hours of investigation I found the following possible solution.

  • create valid absolute paths in our tests depending on current OS
  • Fix query if it’s an absolute path (#131)
  • split passing & non passing configs in different folders (per OS)
  • run these test webpack-configs tests for the current OS only

This is a bigger change as I expected and it might have some tradeoffs, but otherwise I would not be able to contribute any longer which I really like…

I don’t want to make that changes until you all are ok with that @kentcdodds @bebraw @jonathanewerner

0reactions
jonathanglasmeyercommented, Aug 12, 2016

Fine by me. If you can encapsulate the path bits somewhere, that would be great.

Yea, let’s extract this as test/mock/absolutePath or something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when I try to run `npm run test` in windows command ...
I tried to run npm run test on my directory but I get an error in the terminal that says: '.' is not...
Read more >
npm run test does not work on Windows cmd #4886 - GitHub
Description: Default script of npm run test does not work on Windows cmd. ... I think the reason is that Windows cmd can't...
Read more >
npm-run-script
Description. This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts.
Read more >
Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why​.
Read more >
Having a problem running tests with "npm test" : r/node - Reddit
I'm using Windows 8.1. '.' is not recognized as an internal or external command, operable program or batch file. NPM is running your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found