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

📝 Docs: Indicate that "exports" interface does not work in browsers #3974

Closed
JKAnderson409 opened this issue Jul 25, 2019 · 2 comments · Fixed by #5181
Closed

📝 Docs: Indicate that "exports" interface does not work in browsers #3974

JKAnderson409 opened this issue Jul 25, 2019 · 2 comments · Fixed by #5181
Labels
area: browser browser-specific area: documentation anything involving docs or mochajs.org good first issue new contributors should look here! status: accepting prs Mocha can use your help with this one!

Comments

@JKAnderson409
Copy link

Is your feature request related to a problem or a nice-to-have?? Please describe.
I wasted a good deal of time trying to get the "exports" interface (which I think is perfect for organizing tests for a large OOP project) only to find that it just does not work in the browser. I can get my demo test to run on the command line (node) just fine but Firefox and Chromium ignore the exported test suite when the interface is set to "exports".

Describe the solution you'd like
The docs should indicate that this is the case in both the "Interfaces" and "Browser support" sections.

Describe alternatives you've considered
Of course it would be nice if it was fixed to work in the browser but I think that updating the docs is the best immediate fix.

Additional context
This was brought up quite a while ago (#2198) with some manual solutions to get it working but it does not appear that the docs were updated to reflect the issue.

@JKAnderson409 JKAnderson409 added the type: feature enhancement proposal label Jul 25, 2019
@craigtaub
Copy link
Contributor

Makes sense. Thanks for raising.

@craigtaub craigtaub added area: documentation anything involving docs or mochajs.org area: browser browser-specific good first issue new contributors should look here! and removed type: feature enhancement proposal labels Jul 30, 2019
@JoshuaKGoldberg JoshuaKGoldberg changed the title Update docs to indicate that "exports" interface does not work in browsers 📝 Docs: Indicate that "exports" interface does not work in browsers Dec 27, 2023
@JoshuaKGoldberg JoshuaKGoldberg added the status: accepting prs Mocha can use your help with this one! label Feb 6, 2024
@deyjoy
Copy link
Contributor

deyjoy commented Jul 23, 2024

Hi everyone,

I have created a pull request to address the documentation issue regarding the "exports" interface not working in browser environments. You can view the PR here: PR #5181.

In this PR:

  • docs/index.md: Added a note explaining the limitation with the "exports" interface under the relevant section.
  • docs/API.md: Added a note under the "exports" interface section explaining its incompatibility with browsers.

Please review and let me know if any further changes are needed.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: browser browser-specific area: documentation anything involving docs or mochajs.org good first issue new contributors should look here! status: accepting prs Mocha can use your help with this one!
Projects
None yet
4 participants