deno
f4be8bc6 - tests(run): add spec tests for non-executable entrypoints (#34779)

Commit
80 days ago
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.
Author
Parents
Loading