Skip to content

Support passing paths to --watch flag of deno test #21704

Open
@lionel-rowe

Description

@lionel-rowe

Currently, the following works as expected:

deno run --watch=watched-file.ts other-file.ts

However, the following fails:

deno test --watch=watched-file.ts other-file.ts
# error: unexpected value 'watched-file.ts' for '--watch' found; no more were expected

It seems like there isn't currently any way to customize the files that watched with the test command. It's also somewhat unexpected that --watch wouldn't work identically between run vs test (but I guess it might need to work somewhat differently due to multiple entrypoints?)

Motivating use case: test suite includes some doc tests that run code blocks found in markdown files, so the tests should be re-run on changes to the markdown files as well as ts/js files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featnew feature (which has been agreed to/accepted)good first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions