We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b26144c commit 79cc593Copy full SHA for 79cc593
1 file changed
doc/api/test.md
@@ -2522,10 +2522,10 @@ The following example demonstrates how a mock is created for a module.
2522
2523
```js
2524
test('mocks a builtin module in both module systems', async (t) => {
2525
- // Create a mock of 'node:readline' with a named export named 'fn', which
+ // Create a mock of 'node:readline' with a named export named 'foo', which
2526
// does not exist in the original 'node:readline' module.
2527
const mock = t.mock.module('node:readline', {
2528
- exports: { fn() { return 42; } },
+ exports: { foo: () => 42 },
2529
});
2530
2531
let esmImpl = await import('node:readline');
0 commit comments