Skip to content

Commit 14e640e

Browse files
deyjoyJoshuaKGoldberg
andauthoredOct 30, 2024··
docs: indicate 'exports' interface does not work in browsers (#5181)
* docs: indicate 'exports' interface does not work in browsers * docs: move 'exports' interface browser compatibility note to the exports section * docs: remove redundant 'exports' interface note from API.md * Apply suggestions from code review * Update docs/index.md --------- Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
1 parent 881e3b0 commit 14e640e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎docs/index.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,11 @@ suite('Array', function () {
18271827

18281828
### Exports
18291829

1830-
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:
1830+
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.
1831+
1832+
**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.
1833+
1834+
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:
18311835

18321836
```js
18331837
module.exports = {

0 commit comments

Comments
 (0)
Please sign in to comment.