Skip to content

Commit 318ecce

Browse files
authored
docs: fix broken Deno.test.each API reference links (#3394)
1 parent ca5aa6d commit 318ecce

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/lint.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,26 @@ jobs:
2828
- run: deno fmt --check
2929
- run: deno task test
3030

31-
# Cache reference types + generated docs (types: 86s, docs: 162s)
32-
- name: Restore reference cache
33-
uses: actions/cache@v4
34-
id: ref-cache
35-
with:
36-
path: |
37-
reference_gen/types
38-
reference_gen/gen
39-
key: reference-${{ hashFiles('reference_gen/**') }}
40-
restore-keys: reference-
41-
31+
# The types come from `deno types`, so they depend on the Deno binary,
32+
# not on any repo file. Regenerate them every run (types: 86s) and cache
33+
# only the doc generation (docs: 162s), keyed on the generated types'
34+
# content. A repo-only cache key kept serving reference docs generated
35+
# with an older Deno, missing newly added APIs (#3389).
4236
- name: "Reference: install"
43-
if: steps.ref-cache.outputs.cache-hit != 'true'
4437
working-directory: "reference_gen"
4538
run: deno install
4639

4740
- name: "Reference: generate types"
48-
if: steps.ref-cache.outputs.cache-hit != 'true'
4941
working-directory: "reference_gen"
5042
run: deno task types
5143

44+
- name: Restore reference docs cache
45+
uses: actions/cache@v4
46+
id: ref-cache
47+
with:
48+
path: reference_gen/gen
49+
key: reference-${{ hashFiles('reference_gen/types/**', 'reference_gen/*.ts', 'reference_gen/*.json', 'reference_gen/*.jsonc', 'reference_gen/deno.lock', 'reference_gen/node_descriptions/**') }}
50+
5251
- name: "Reference: generate docs"
5352
if: steps.ref-cache.outputs.cache-hit != 'true'
5453
working-directory: "reference_gen"

oldurls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"/runtime/reference/tcp_udp_connections/": "/examples/",
3838
"/runtime/getting_started/": "/runtime/",
3939
"/api/deno/~/Deno.TlsConn.rid/": "/runtime/reference/migration_guide/#rid",
40+
"/api/deno/~/Deno.test.each/": "/api/deno/~/Deno.DenoTest.each",
4041
"/manual@main/advanced/typescript/faqs": "/runtime/fundamentals/typescript/",
4142
"/runtime/tutorials/": "/examples/",
4243
"/runtime/manual/examples/how_to_with_npm/": "/examples/",

runtime/reference/cli/test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified: 2026-06-25
2+
last_modified: 2026-07-06
33
title: "deno test"
44
oldUrl: /runtime/manual/tools/test/
55
command: test
@@ -152,7 +152,7 @@ per-metric configuration.
152152
## Parameterized tests
153153

154154
Run the same test body over a table of cases with
155-
[`Deno.test.each`](/api/deno/~/Deno.test.each), which registers one
155+
[`Deno.test.each`](/api/deno/~/Deno.DenoTest.each), which registers one
156156
independently reported test per case. See
157157
[Parameterized tests](/runtime/test/#parameterized-tests) for the name templates
158158
and case forms.

runtime/test/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
last_modified: 2026-07-02
2+
last_modified: 2026-07-06
33
title: "Testing"
44
description: "Write and run tests with Deno's built-in test runner: assertions, test steps, hooks, filtering, and reporters, with dedicated guides for mocking, snapshots, and coverage."
55
oldUrl:
@@ -204,8 +204,8 @@ deno test --retry=2
204204

205205
## Parameterized tests
206206

207-
[`Deno.test.each`](/api/deno/~/Deno.test.each) runs the same test body over a
208-
table of cases. It registers one real test per case, so each case reports
207+
[`Deno.test.each`](/api/deno/~/Deno.DenoTest.each) runs the same test body over
208+
a table of cases. It registers one real test per case, so each case reports
209209
independently and can be filtered or run on its own.
210210

211211
Array cases are spread as positional arguments. The name template interpolates
@@ -235,7 +235,7 @@ Deno.test.each([
235235
});
236236
```
237237

238-
[`Deno.test.each`](/api/deno/~/Deno.test.each) accepts the usual per-test
238+
[`Deno.test.each`](/api/deno/~/Deno.DenoTest.each) accepts the usual per-test
239239
options object, and the `only` and `ignore` shorthands compose with it as
240240
`.only.each` and `.ignore.each`.
241241

0 commit comments

Comments
 (0)