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

Windows Regression Test Fix #1285

Merged
merged 2 commits into from
Jan 14, 2020
Merged

Windows Regression Test Fix #1285

merged 2 commits into from
Jan 14, 2020

Conversation

sh0ji
Copy link
Contributor

@sh0ji sh0ji commented Dec 14, 2019

This just moves the test globbing to the Ava configuration, which should solve issues where Windows wasn't able to find files.

Some background: npm scripts will run command line operations, leveraging whatever syntax features the operating system has in place, which results in test/tests/*.js does not exist. on Windows. This change forces Ava to use its own internal globbing algorithm (globby), which has cross-platform support.

@jongund
Copy link
Contributor

jongund commented Dec 14, 2019

Will this change force running all the tests?
Can you sill run individual test files like to just run the tests for carousel-2-tablist example:

npm run regression -- --match *carousel-2*

@sh0ji
Copy link
Contributor Author

sh0ji commented Dec 15, 2019

That should still work, though I haven't tested it. You can also target specific files if you like, now that the npm script doesn't contain the file glob.

# windows path
npm run regression -- test\tests\carousel_carousel-1.js

@jongund
Copy link
Contributor

jongund commented Dec 16, 2019

@spectranaut @sh0ji Evan thanks for this fix, it is working in Windows now and I can run individual test files using the method you describe.

@jongund jongund self-requested a review December 16, 2019 16:46
Copy link
Contributor

@jongund jongund left a comment

Choose a reason for hiding this comment

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

This fixes the problem I had running tests in Windows 10 and I also tested on macOS and the change in configuration seems to be working there too.

@spectranaut spectranaut self-requested a review December 16, 2019 21:12
Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

Looks good, runs in CI and locally on my linux machine!

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.

4 participants