| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ee4fc7d commit 62f823d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1545,7 +1545,7 @@ import { mock } from 'node:test'; | |||
| 1545 | 1545 | mock.timers.enable(['setInterval']); | |
| 1546 | 1546 | ``` | |
| 1547 | 1547 | ||
| 1548 | - ```js | ||
| 1548 | + ```cjs | ||
| 1549 | 1549 | const { mock } = require('node:test'); | |
| 1550 | 1550 | mock.timers.enable(['setInterval']); | |
| 1551 | 1551 | ``` | |
@@ -1582,7 +1582,7 @@ import { mock } from 'node:test'; | |||
| 1582 | 1582 | mock.timers.reset(); | |
| 1583 | 1583 | ``` | |
| 1584 | 1584 | ||
| 1585 | - ```js | ||
| 1585 | + ```cjs | ||
| 1586 | 1586 | const { mock } = require('node:test'); | |
| 1587 | 1587 | mock.timers.reset(); | |
| 1588 | 1588 | ``` | |
@@ -1631,7 +1631,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w | |||
| 1631 | 1631 | }); | |
| 1632 | 1632 | ``` | |
| 1633 | 1633 | ||
| 1634 | - ```js | ||
| 1634 | + ```cjs | ||
| 1635 | 1635 | const assert = require('node:assert'); | |
| 1636 | 1636 | const { test } = require('node:test'); | |
| 1637 | 1637 | ||
@@ -1670,7 +1670,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w | |||
| 1670 | 1670 | }); | |
| 1671 | 1671 | ``` | |
| 1672 | 1672 | ||
| 1673 | - ```js | ||
| 1673 | + ```cjs | ||
| 1674 | 1674 | const assert = require('node:assert'); | |
| 1675 | 1675 | const { test } = require('node:test'); | |
| 1676 | 1676 | ||
@@ -1714,7 +1714,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w | |||
| 1714 | 1714 | }); | |
| 1715 | 1715 | ``` | |
| 1716 | 1716 | ||
| 1717 | - ```js | ||
| 1717 | + ```cjs | ||
| 1718 | 1718 | const assert = require('node:assert'); | |
| 1719 | 1719 | const { test } = require('node:test'); | |
| 1720 | 1720 | ||
@@ -1771,7 +1771,7 @@ test('mocks setTimeout to be executed synchronously without having to actually w | |||
| 1771 | 1771 | }); | |
| 1772 | 1772 | ``` | |
| 1773 | 1773 | ||
| 1774 | - ```js | ||
| 1774 | + ```cjs | ||
| 1775 | 1775 | const assert = require('node:assert'); | |
| 1776 | 1776 | const { test } = require('node:test'); | |
| 1777 | 1777 | const nodeTimers = require('node:timers'); | |
@@ -1833,7 +1833,7 @@ test('should tick five times testing a real use case', async (context) => { | |||
| 1833 | 1833 | }); | |
| 1834 | 1834 | ``` | |
| 1835 | 1835 | ||
| 1836 | - ```js | ||
| 1836 | + ```cjs | ||
| 1837 | 1837 | const assert = require('node:assert'); | |
| 1838 | 1838 | const { test } = require('node:test'); | |
| 1839 | 1839 | const nodeTimersPromises = require('node:timers/promises'); | |
@@ -1899,7 +1899,7 @@ test('runAll functions following the given order', (context) => { | |||
| 1899 | 1899 | }); | |
| 1900 | 1900 | ``` | |
| 1901 | 1901 | ||
| 1902 | - ```js | ||
| 1902 | + ```cjs | ||
| 1903 | 1903 | const assert = require('node:assert'); | |
| 1904 | 1904 | const { test } = require('node:test'); | |
| 1905 | 1905 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments