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

'npm run test' not working on windows #130

Closed
nyrosmith opened this issue Aug 10, 2016 · 8 comments
Closed

'npm run test' not working on windows #130

nyrosmith opened this issue Aug 10, 2016 · 8 comments

Comments

@nyrosmith
Copy link
Collaborator

nyrosmith commented Aug 10, 2016

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...

@kentcdodds
Copy link
Collaborator

Hmmm... I got it working (on my mac) without trouble. Maybe there's a specific test that has problems. Could you see if you can find the hanging test?

@nyrosmith
Copy link
Collaborator Author

Need to do binary search to detect the potential test. Let me see if I find something suspicious.

@nyrosmith
Copy link
Collaborator Author

I could tackle the problem down to this line
Nothing after
const nodeModuleFolder = findNodeModules({ cwd: path_, relative: false })[0]
executes.
The problematic test whith the problem causing config is this one

My approach is to adjust the testConfigs to provide valid absolute paths if ENV === windows.
Any thoughts about this solution @kentcdodds @jonathanewerner ?

@kentcdodds
Copy link
Collaborator

I'd love to see it 👍

@nyrosmith
Copy link
Collaborator Author

nyrosmith commented 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 ('absolutePath' not working for windows environments #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

@bebraw
Copy link
Contributor

bebraw commented Aug 12, 2016

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

@kentcdodds
Copy link
Collaborator

:shipit: 😄

@jonathanglasmeyer
Copy link
Collaborator

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.

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

No branches or pull requests

4 participants