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

Cannot run tests correctly on Windows #8737

Closed
jddxf opened this issue Jan 10, 2017 · 5 comments
Closed

Cannot run tests correctly on Windows #8737

jddxf opened this issue Jan 10, 2017 · 5 comments

Comments

@jddxf
Copy link
Contributor

jddxf commented Jan 10, 2017

There are some issues in test code failing the tests on Windows.

  1. Invalid regular expression
    https://github.com/facebook/react/blob/master/scripts/jest/ts-preprocessor.js#L30-L32
    It would be an invalid regexp just like /\(a)/.

  2. Invalid arguments passed to child_process.spawn
    https://github.com/facebook/react/blob/master/src/isomorphic/modern/class/__tests__/ReactClassEquivalence-test.js#L34-L45
    This issue is similar to "npm run lint" fails on Windows #8021

@aweary
Copy link
Contributor

aweary commented Jan 10, 2017

@jddxf do you want to submit a PR with fixes for these?

@jddxf
Copy link
Contributor Author

jddxf commented Jan 10, 2017

Sure,I've already done this.Something is wrong with my git.I can't fetch or push.

@jddxf
Copy link
Contributor Author

jddxf commented Jan 11, 2017

Fixed here #8747 .Also I wonder whether issues of this sort should be opened since they're not related to the functionality.Maybe a PR would be enough?

gaearon pushed a commit that referenced this issue Jan 12, 2017
* fix failed tests on Windows #8737

* Use regexp literal instead of `RegExp` constructor so that we don't need to bother with escaping special character like `\` and `.`.
Note that by removing the path separator in regexp, I've relaxed the matching condition a little.Since there's little chance we have files like `XXXReact.d.ts`,it should not matter.
@jddxf jddxf closed this as completed Jan 13, 2017
@gaearon
Copy link
Collaborator

gaearon commented Jan 13, 2017

If you can fix it, just send a PR, but when not sure or don’t have time, please file an issue so somebody else could do it. Thanks for jumping on this.

@jddxf
Copy link
Contributor Author

jddxf commented Jan 13, 2017

got it.thanks.

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

3 participants