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 test for flow type export #835

Merged
merged 1 commit into from
May 18, 2017
Merged

Conversation

hazeledmands
Copy link

@hazeledmands hazeledmands commented May 17, 2017

This adds a test for the bug reported in issue #758 and #660, which was already fixed by bfdc2bb. :)

If I revert that commit, the test fails with this error:

  1) no-mutable-exports valid type Foo = {}
export type {Foo}:
     TypeError: Cannot read property 'kind' of null
      at checkDeclaration (src/rules/no-mutable-exports.js:7:37)
      at checkDeclarationsInScope (src/rules/no-mutable-exports.js:19:15)
      at EventEmitter.handleExportNamed (src/rules/no-mutable-exports.js:41:11)
      at NodeEventGenerator.applySelector (node_modules/eslint/lib/util/node-event-generator.js:265:26)
      at NodeEventGenerator.applySelectors (node_modules/eslint/lib/util/node-event-generator.js:294:22)
      at NodeEventGenerator.enterNode (node_modules/eslint/lib/util/node-event-generator.js:308:14)
      at CodePathAnalyzer.enterNode (node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:602:23)
      at CommentEventGenerator.enterNode (node_modules/eslint/lib/util/comment-event-generator.js:98:23)
      at Traverser.enter (node_modules/eslint/lib/eslint.js:929:36)
      at Traverser.__execute (node_modules/estraverse/estraverse.js:397:31)
      at Traverser.traverse (node_modules/estraverse/estraverse.js:501:28)
      at Traverser.traverse (node_modules/eslint/lib/util/traverser.js:31:22)
      at EventEmitter.module.exports.api.verify (node_modules/eslint/lib/eslint.js:926:23)
      at runRuleForItem (node_modules/eslint/lib/testers/rule-tester.js:387:38)
      at testValidTemplate (node_modules/eslint/lib/testers/rule-tester.js:420:28)
      at Context.RuleTester.it (node_modules/eslint/lib/testers/rule-tester.js:548:25)

This tests the bug reported in issue import-js#758, which was actually already fixed in
PR import-js#660.
@coveralls
Copy link

coveralls commented May 17, 2017

Coverage Status

Coverage remained the same at 94.915% when pulling b4dcd43 on demands:support-flow into bd0e5e3 on benmosher:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants