Skip to content

doc: fix wrong function name in example of `context.plan()`

t.subtest -> t.test

Refs: https://github.com/nodejs/node/pull/52860

(1) With t.subtest

✖ top level test (2.496498ms)
  TypeError: t.subtest is not a function
      at TestContext.<anonymous> (/home/deokjinkim/oss/node-playground/tr2.js:6:5)
      at Test.runInAsyncScope (node:async_hooks:206:9)
      at Test.run (node:internal/test_runner/test:841:25)
      at Test.processPendingSubtests (node:internal/test_runner/test:550:18)
      at node:internal/test_runner/harness:247:12
      at node:internal/process/task_queues:140:7
      at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
      at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)

(2) With t.test

▶ top level test
  ✔ subtest (1.334498ms)
▶ top level test (3.065425ms)
ℹ tests 2
ℹ suites 0
ℹ pass 2
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 12.305652

Merge request reports

Loading