-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: use exports.default #234
base: master
Are you sure you want to change the base?
Conversation
@@ -2,5 +2,5 @@ | |||
|
|||
import createRunner from "./lib/create-runner"; | |||
|
|||
module.exports = createRunner(); | |||
module.exports.createRunner = createRunner; | |||
exports.default = createRunner(); |
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.
I also think this should not be called (?)
exports.default = createRunner(); | |
exports.default = createRunner; |
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.
form the docs:
Your test runner module must export a single function, which Atom will call within a new window to run your package's tests.
the default export is so people can use "atomTestRunner": "atom-jasmine3-test-runner"
if they want to use the default configuration.
What new babel? is Atom updating the version of babel that it is using in newer versions? |
This makes the default runner fail with |
I need to test this more. The only way I could export my runner was by |
atom/atom#21715 was added in Atom v1.56.0-beta0 so using a That is why I have this note in the readme for writing tests in typescript.
|
Ah, I thought the default export fix is already in the stable version. Isn't it? Atom's versioning is really getting annoying |
Based on the new ES modules standard (what new Babel expects), you should not mix
module.exports =
withmodule.exports.name =
as one of them overwrites the other.Fixes the issue with the new Babel:

AtomLinter/linter-eslint#1422