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

Add support for setupTests.ts #5698

Merged
merged 1 commit into from
Nov 23, 2018
Merged

Conversation

ianschmitz
Copy link
Contributor

@ianschmitz ianschmitz commented Nov 3, 2018

Closes #5666.

Note that because we have "isolatedModules": true in tsconfig.json, the IDE will complain Cannot compile namespaces when the '--isolatedModules' flag is provided. An easy work around is to export default {} or something similar. Perhaps we should update the docs to flag this? (this has already been covered in the docs)

@Timer
Copy link
Contributor

Timer commented Nov 3, 2018

I've seen people suggesting to use export default undefined;, etc. Probably worth a docs mention, though TypeScript is working to fix it AFAIK.

@@ -437,8 +437,8 @@ module.exports = {
'!**/*.json',
'!**/__tests__/**',
'!**/?(*.)(spec|test).*',
'!src/setupProxy.js',
'!src/setupTests.*',
'!**/src/setupProxy.*',
Copy link
Contributor Author

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

Copy link
Contributor

@Timer Timer left a comment

Choose a reason for hiding this comment

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

LGTM.

@ianschmitz ianschmitz merged commit 49e258b into facebook:master Nov 23, 2018
dardub added a commit to OffBase/create-react-app that referenced this pull request Nov 27, 2018
* 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)
  ...
mrmckeb pushed a commit to BeameryHQ/bmr-react-scripts that referenced this pull request Dec 3, 2018
timsnadden added a commit to timsnadden/create-react-app that referenced this pull request Dec 7, 2018
* 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)
  ...
@ianschmitz ianschmitz deleted the setuptests-ts branch January 5, 2019 07:00
@lock lock bot locked and limited conversation to collaborators Jan 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants