Skip to content

Commit bcdd857

Browse files
committed
docs: indicate 'exports' interface does not work in browsers
1 parent 9692b3a commit bcdd857

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/API.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Congratulations! You've found Mocha's API documentation. These docs are for deve
1010

1111
Otherwise, **you probably want the [main documentation](https://mochajs.org)**.
1212

13+
## Exports Interface
14+
15+
The "exports" interface is useful for organizing tests in a modular fashion. However, please note that the "exports" interface is **not supported in browser environments**. This is due to the way browsers handle module exports, which differs from Node.js. If you need to organize your tests for a large OOP project, consider using the BDD or TDD interfaces instead.
16+
1317
## Other Links
1418

1519
- **[Main Documentation](https://mochajs.org)**

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Mocha is a feature-rich JavaScript test framework running on [Node.js][] and in
4646
- [TextMate bundle](#textmate)
4747
{:.two-column}
4848

49+
## Running Mocha
50+
51+
Mocha can be run in various environments, including Node.js and browsers. While most interfaces such as BDD and TDD are fully supported, please note that the "exports" interface does not work in browser environments due to how browsers handle module exports. Refer to the [Interfaces](./API.md#exports-interface) and [Browser Support](./browser-support.md) documentation for more details.
52+
4953
## Table of Contents
5054

5155
{{ toc }}

0 commit comments

Comments
 (0)