Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] Watch mode doesn't seem to work #18

Closed
sand4rt opened this issue Nov 11, 2023 · 4 comments
Closed

[Bug] Watch mode doesn't seem to work #18

sand4rt opened this issue Nov 11, 2023 · 4 comments

Comments

@sand4rt
Copy link
Contributor

sand4rt commented Nov 11, 2023

The watched tests are not run again when the tests are changed and saved. Is this not supported?

Related to marilari88/neotest-vitest#27, probably microsoft/playwright#21960 and microsoft/playwright#14748

@AlexandrosAlexiou
Copy link
Contributor

Same here

@thenbe
Copy link
Owner

thenbe commented Jan 31, 2024

Is this not supported?

That's correct, playwright's watch mode did not exist when I created this plugin. But I'm open to adding watch mode support if anyone wants to submit a PR.

@sand4rt
Copy link
Contributor Author

sand4rt commented Jun 8, 2024

It seems to work as expected now when i add:

watch = {
    enabled = true,
    symbol_queries = {
        javascript = '  ;query\n  ;Captures named imports\n  (import_specifier name: (identifier) @symbol)\n  ;Captures default import\n  (import_clause (identifier) @symbol)\n  ;Capture require statements\n  (variable_declarator \n  name: (identifier) @symbol\n  value: (call_expression (identifier) @function  (#eq? @function "require")))\n  ;Capture namespace imports\n  (namespace_import (identifier) @symbol)\n',
        tsx = '  ;query\n  ;Captures named imports\n  (import_specifier name: (identifier) @symbol)\n  ;Captures default import\n  (import_clause (identifier) @symbol)\n  ;Capture require statements\n  (variable_declarator \n  name: (identifier) @symbol\n  value: (call_expression (identifier) @function  (#eq? @function "require")))\n  ;Capture namespace imports\n  (namespace_import (identifier) @symbol)\n',
        typescript = '  ;query\n  ;Captures named imports\n  (import_specifier name: (identifier) @symbol)\n  ;Captures default import\n  (import_clause (identifier) @symbol)\n  ;Capture require statements\n  (variable_declarator \n  name: (identifier) @symbol\n  value: (call_expression (identifier) @function  (#eq? @function "require")))\n  ;Capture namespace imports\n  (namespace_import (identifier) @symbol)\n'
    }
}

to require("neotest").setup as described in the docs:
https://github.com/nvim-neotest/neotest/blob/6f35d797882c6ce0ab7c87dc86561512dc3d7aba/doc/neotest.txt#L190-L202

@sand4rt
Copy link
Contributor Author

sand4rt commented Jul 28, 2024

closed because it works with the config above

@sand4rt sand4rt closed this as completed Jul 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants