Skip to content

Commit 874461e

Browse files
committed
docs(guides): use mermaid diagram in test-adapters doc
1 parent c4e95f5 commit 874461e

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

site/src/content/docs/guides/test-adapters.md renamed to site/src/content/docs/guides/test-adapters.mdx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,19 @@ modestbench test ava "test/*.js"
147147

148148
The `test` command uses ES module loader hooks to intercept imports of your test framework. When your test file imports `jest`, `mocha`, `ava`, or `node:test`, modestbench provides a mock implementation that captures test definitions instead of running them.
149149

150-
```text
151-
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
152-
│ Test File │ ──▶ │ Loader Hooks │ ──▶ │ Mock Framework │
153-
│ import 'mocha' │ │ Intercept import│ │ Capture tests │
154-
└─────────────────┘ └──────────────────┘ └─────────────────┘
155-
156-
157-
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
158-
│ Reporter │ ◀── │ Benchmark Run │ ◀── │ Convert to │
159-
│ Output │ │ Execute N times │ │ Benchmarks │
160-
└─────────────────┘ └──────────────────┘ └─────────────────┘
150+
```mermaid
151+
flowchart TD
152+
subgraph capture["Test Capture"]
153+
A["Test File<br/><code>import 'mocha'</code>"] --> B["Loader Hooks<br/><em>Intercept import</em>"]
154+
B --> C["Mock Framework<br/><em>Capture tests</em>"]
155+
end
156+
157+
subgraph execute["Benchmark Execution"]
158+
D["Convert to<br/>Benchmarks"] --> E["Benchmark Run<br/><em>Execute N times</em>"]
159+
E --> F["Reporter<br/>Output"]
160+
end
161+
162+
capture --> execute
161163
```
162164

163165
### Test → Benchmark Mapping
@@ -320,3 +322,4 @@ modestbench run "benchmarks/**/*.bench.js" --iterations 1000
320322
- Learn about [CLI options](/guides/cli/#modestbench-test) for the test command
321323
- Explore [Output Formats](/guides/output/) for reporter options
322324
- Set up [Performance Budgets](/guides/performance-budgets/) to enforce standards
325+

0 commit comments

Comments
 (0)