-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Add support for setupTests.ts #5698
Conversation
I've seen people suggesting to use |
@@ -437,8 +437,8 @@ module.exports = { | |||
'!**/*.json', | |||
'!**/__tests__/**', | |||
'!**/?(*.)(spec|test).*', | |||
'!src/setupProxy.js', | |||
'!src/setupTests.*', | |||
'!**/src/setupProxy.*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what i was referring to @Timer. It would still complain when running yarn start
from root of CRA, when the rule was !src/setupProxy.*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
e73f1bc
to
2f69f09
Compare
* upstream/master: (210 commits) Support setupTests.ts (facebook#5698) Remove unnecessary whitespace in template HTML Run prettier on HTML files (facebook#5839) Some Grammar fixes (facebook#5858) Fix link to page about running tests (facebook#5883) fix: make typescriptformatter support 0.5 of fork checker (facebook#5879) Always test with the latest stable Node version on Travis (facebook#5546) Fix propertyDecorator test Upgrade babel deps Fix annotated var test Fix TypeScript decorator support (facebook#5783) fix: add `sideEffects: false` to react-error-overlay (facebook#5451) Add allowESModules option to babel-preset-react-app (facebook#5487) Make named-asset-import plugin work with export-as syntax (facebook#5573) React native repository updated in README.md (facebook#5849) extra polyfills must be included manually (facebook#5814) Rename 'getting started' link to 'docs' (facebook#5806) docs: Simplify installing Storybook with npx (facebook#5788) Don't polyfill fetch for Node -- additional files (facebook#5789) docs: Change Storybook install documentation (facebook#5779) ...
* master: (39 commits) Added extension to .eslintrc (facebook#5988) Update links to docs in all package README files (facebook#5912) Use https for linked images in docs to fix mixed content warnings (facebook#5985) Improve error messaging in verifyPackageTree.js (facebook#5974) Add removeItem to localStorage mock in docs (facebook#5919) Add SASS_PATH instructions to Sass docs (facebook#5917) Suggest a different default for speed reasons (facebook#5959) Add pre-eject message about new features in v2 (facebook#5954) Add netlify.toml to prepare for deploy to netlify facebook#5807 (facebook#5930) Correct some comments (facebook#5927) Add note to docs about using Sass and Flow together (facebook#5823) Update PWA link in README (facebook#5907) Add placeholders to template README for bit.ly links. (facebook#5808) Disable copy to clipboard in cra --info (facebook#5905) Support setupTests.ts (facebook#5698) Remove unnecessary whitespace in template HTML Run prettier on HTML files (facebook#5839) Some Grammar fixes (facebook#5858) Fix link to page about running tests (facebook#5883) fix: make typescriptformatter support 0.5 of fork checker (facebook#5879) ...
Closes #5666.
Note that because we have
"isolatedModules": true
intsconfig.json
, the IDE will complainCannot compile namespaces when the '--isolatedModules' flag is provided.
An easy work around is toexport default {}
or something similar.Perhaps we should update the docs to flag this?(this has already been covered in the docs)