Skip to content

Commit

Permalink
Docs: remove note about TypeScript files requiring at least one export (
Browse files Browse the repository at this point in the history
  • Loading branch information
MidnightDesign authored and iansu committed Jul 22, 2019
1 parent a95c573 commit ad51d62
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
```

> Note: When using TypeScript with Babel, all your files need to have at least one export, otherwise you will get the error `Cannot compile namespaces when the '--isolatedModules' flag is provided.`. To fix this, you can add `export default undefined` to `src/setupTests.ts`.
> Note: Keep in mind that if you decide to "eject" before creating `src/setupTests.js`, the resulting `package.json` file won't contain any reference to it. [Read here](#initializing-test-environment) to learn how to add this after ejecting.
Now you can write a smoke test with it:
Expand Down

1 comment on commit ad51d62

@AndrewPrifer
Copy link

Choose a reason for hiding this comment

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

Shouldn't it be clarified that files still need at least one import OR export?

Please sign in to comment.