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 'exports' interface does not work in browsers #5181

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,10 @@ suite('Array', function () {

### Exports

The `exports` interface allows for organizing tests in a modular fashion. It is particularly useful in larger projects where test suites can be segmented into different files.
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved

**Note**: The `exports` interface is not supported in browser environments. This limitation arises because browsers handle module exports differently from Node.js. If you intend to run tests in a browser, consider using the BDD or TDD interfaces, which are fully supported.
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved

The **Exports** interface is much like Mocha's predecessor [expresso][]. The keys `before`, `after`, `beforeEach`, and `afterEach` are special-cased, object values are suites, and function values are test-cases:
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved

```js
Expand Down