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 0498de3 commit f956d87Copy full SHA for f956d87
doc/api/test.md
@@ -2465,10 +2465,10 @@ The following example demonstrates how a mock is created for a module.
2465
2466
```js
2467
test('mocks a builtin module in both module systems', async (t) => {
2468
- // 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
2469
// does not exist in the original 'node:readline' module.
2470
const mock = t.mock.module('node:readline', {
2471
- exports: { fn() { return 42; } },
+ exports: { foo: () => 42 },
2472
});
2473
2474
let esmImpl = await import('node:readline');
0 commit comments