Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Conversation

@UziTech
Copy link
Contributor

@UziTech UziTech commented Nov 18, 2020

copy of #21661 but using #21112

Identify the Bug

If the atomTestRunner is transpiled by typescript or anything else using atomTranspilers into an ES module the test runner will not run.

https://github.com/UziTech/terminal/blob/a116a214b6690390dfa656f61813c0596ba7523e/package.json#L30-L36

Description of the Change

set testRunner to testRunner.default if testRunner.__esModule is set to true;

Alternate Designs

Possible Drawbacks

none

Verification Process

compiled Atom and with this fix and tested the code at https://github.com/UziTech/terminal/tree/custom-runner-ts

Release Notes

Allow atomTestRunner to point to an ES Module

@UziTech

This comment has been minimized.

TextEditor.setClipboard(clipboard);
TextEditor.viewForItem = (item) => atom.views.getView(item);

const testRunner = requireModule(testRunnerPath);
Copy link
Contributor Author

@UziTech UziTech Nov 18, 2020

Choose a reason for hiding this comment

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

using requireModule instead of require here is the only change other than decaffeinating the file.

@UziTech UziTech force-pushed the transpiled-testPath branch 3 times, most recently from 838d332 to 90839c0 Compare November 18, 2020 20:02
@UziTech UziTech force-pushed the transpiled-testPath branch from 90839c0 to bd544cf Compare November 18, 2020 20:36
@darangi
Copy link
Contributor

darangi commented Dec 11, 2020

Thanks @UziTech

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.

2 participants