Commit f4be8bc
authored
tests(run): add spec tests for non-executable entrypoints (#34779)
Adds characterization spec tests for two `deno run` error paths where
the command-line entrypoint can't be executed as an ES module. The
existing run specs cover missing modules and import-*statement*
resolution, but not these entrypoint cases.
New spec dir `tests/specs/run/entrypoint_errors`:
| entrypoint | error |
| --- | --- |
| a directory | `ERR_UNSUPPORTED_DIR_IMPORT` (no index resolution for
file: ESM entrypoints, even when the dir contains a module) |
| a `.json` file | rejected — JSON needs an explicit `with { type:
"json" }` attribute, which a bare entrypoint can't supply |
Each asserts exit code 1 and the error output (the directory path is
wildcarded). Test-only change; no runtime behavior is affected.1 parent d23528d commit f4be8bc
3 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments