Skip to content

Conversation

codiophile
Copy link
Contributor

These are the changes I made in my own project to enable ESM interoperability, based on the following advice: octokit/octokit.js#2865 (comment)

I've been using it for several weeks now and it's been working well without any issues. The only problem I've had is that jest didn't play nicely with ESM. I had to add "isolatedModules": true to suppress a warning and so far the best solution I've found for testing ESM with jest is to simply mock the ESM imports and test with mocks instead. This is fine for me, since the ESM dependency I have is Octokit and I don't want to be making http requests to GitHub during testing anyway.

Regardless, it seems better to have ESM interoperability, than not having it, even though it's a bit lacking in the jest environment.

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

Successfully merging this pull request may close these issues.

2 participants