Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: use cjs as block code's type in MockTimers #49309

Merged
merged 1 commit into from
Aug 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ import { mock } from 'node:test';
mock.timers.enable(['setInterval']);
```

```js
```cjs
const { mock } = require('node:test');
mock.timers.enable(['setInterval']);
```
Expand Down Expand Up @@ -1630,7 +1630,7 @@ import { mock } from 'node:test';
mock.timers.reset();
```

```js
```cjs
const { mock } = require('node:test');
mock.timers.reset();
```
Expand Down Expand Up @@ -1679,7 +1679,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
});
```

```js
```cjs
const assert = require('node:assert');
const { test } = require('node:test');

Expand Down Expand Up @@ -1718,7 +1718,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
});
```

```js
```cjs
const assert = require('node:assert');
const { test } = require('node:test');

Expand Down Expand Up @@ -1762,7 +1762,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
});
```

```js
```cjs
const assert = require('node:assert');
const { test } = require('node:test');

Expand Down Expand Up @@ -1819,7 +1819,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w
});
```

```js
```cjs
const assert = require('node:assert');
const { test } = require('node:test');
const nodeTimers = require('node:timers');
Expand Down Expand Up @@ -1881,7 +1881,7 @@ test('should tick five times testing a real use case', async (context) => {
});
```

```js
```cjs
const assert = require('node:assert');
const { test } = require('node:test');
const nodeTimersPromises = require('node:timers/promises');
Expand Down Expand Up @@ -1947,7 +1947,7 @@ test('runAll functions following the given order', (context) => {
});
```

```js
```cjs
const assert = require('node:assert');
const { test } = require('node:test');

Expand Down
Loading