♻️ Drop assert imports from doc fences
`assert` is the sole injected exception: the generated test always binds it, so a fence must not import it. Revert the README imports and the generator's node:assert merging; the fences keep the assigned variables and `assert.equal` calls, and the generator again rejects a fence that imports node:assert.
This commit is contained in:
1 parent
d0dd8641f2
commit
a9b588e1c3
3 files changed
+11
-22
No files matched your search
+2
-3
@@ -38,9 +38,8 @@ Compile every `ts / `typescript fence in the prose docs into a real
|
||||
`docs/` + `examples/` list is the natural extension; `development/` must never
|
||||
be scanned (its fences are illustrative, not compilable).
|
||||
- The generator hoists and merges leading imports, rewrites `tiny-pattern-ts` to
|
||||
the `#test-tiny-pattern-ts` source alias, merges an example's `node:assert`
|
||||
import into the prelude assert, and rejects an example that imports
|
||||
`node:test` (the prelude binds `test`). Titles are the
|
||||
the `#test-tiny-pattern-ts` source alias, and rejects an example that imports
|
||||
`node:assert` / `node:test` (the prelude already binds both). Titles are the
|
||||
immediately preceding paragraph; a fence with no such paragraph is a fatal
|
||||
error, which keeps every example described.
|
||||
- `oxlint src/doc-test` reports "No files found" because the generated
|
||||
|
||||
Reference in new issue
Block a user