summaryrefslogtreecommitdiff
path: root/cli/lsp/testing/collectors.rs
AgeCommit message (Collapse)Author
2024-11-01fix: improved support for cjs and cts modules (#26558)David Sherret
* cts support * better cjs/cts type checking * deno compile cjs/cts support * More efficient detect cjs (going towards stabilization) * Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only done after loading * Support `import x = require(...);` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-31perf: update deno_ast to 0.41 (#24819)David Sherret
Some perf gains in swc (I measured formatting and it was slightly faster). Includes: * https://github.com/denoland/deno_graph/pull/508 * https://github.com/denoland/eszip/pull/193
2024-06-05fix: better handling of npm resolution occurring on workers (#24094)David Sherret
Closes https://github.com/denoland/deno/issues/24063
2024-04-20perf(lsp): only store parsed sources for open documents (#23454)Nayeem Rahman
2024-02-09fix: upgrade to deno_ast 0.33 (#22341)David Sherret
* Uses diagnostics from deno_ast * Real fix for https://github.com/denoland/deno/pull/22310 * Moves `deno lint --json` code here * Upgrades swc Closes #22117 Closes #22109 Closes #21927 Closes #20993
2024-01-01chore: update to Rust 1.75 (#21731)林炳权
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-10-24fix: improved using declaration support (#20959)David Sherret
Upgrades to deno_ast 0.30.
2023-09-06feat(test): Add Deno.test.ignore and Deno.test.only (#20365)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17106
2023-08-30refactor(lsp): store test definitions in adjacency list (#20330)Nayeem Rahman
Previously: ```rust pub struct TestDefinition { pub id: String, pub name: String, pub range: SourceRange, pub steps: Vec<TestDefinition>, } pub struct TestDefinitions { pub discovered: Vec<TestDefinition>, pub injected: Vec<lsp_custom::TestData>, pub script_version: String, } ``` Now: ```rust pub struct TestDefinition { pub id: String, pub name: String, pub range: Option<Range>, pub is_dynamic: bool, // True for 'injected' module, not statically detected but added at runtime. pub parent_id: Option<String>, pub step_ids: HashSet<String>, } pub struct TestModule { pub specifier: ModuleSpecifier, pub script_version: String, pub defs: HashMap<String, TestDefinition>, } ``` Storing the test tree as a literal tree diminishes the value of IDs, even though vscode stores them that way. This makes all data easily accessible from `TestModule`. It unifies the interface between 'discovered' and 'injected' tests. This unblocks some enhancements wrt syncing tests between the LSP and extension, such as this TODO: https://github.com/denoland/vscode_deno/blob/61f08d5a71536a0a5f7dce965955b09e6bd957e1/client/src/testing.ts#L251-L259 and https://github.com/denoland/vscode_deno/issues/900. We should also get more flexibility overall. `TestCollector` is cleaned up, now stores a `&mut TestModule` directly and registers tests as it comes across them with `TestModule::register()`. This method ensures sanity in the redundant data from having both of `TestDefinition::{parent_id,step_ids}`. All of the messy conversions between `TestDescription`, `LspTestDescription`, `TestDefinition`, `TestData` and `TestIdentifier` are cleaned up. They shouldn't have been using `impl From` and now the full list of tests is available to their implementations.
2023-08-27fix(lsp/testing): use full ancestry to compute static id of step (#20297)Nayeem Rahman
Fixes https://github.com/denoland/vscode_deno/issues/656. Test steps were ID'd by a checksum of `[origin, level, step_name]` which is incorrect. Now it's `[origin, ...ancestor_names, step_name]`.
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-19fix(lsp/testing): fallback name for non-analyzable tests in collector (#17120)Leo Kettmeir
Closes #17054. The fallback is `Test lineNumber:columnNumber`
2022-12-19chore(lsp/testing): refactor collectors test (#17104)Leo Kettmeir
2022-12-17fix(lsp/testing): support not needing to declare first arg function in test ↵Leo Kettmeir
declaration (#17097)
2022-12-16 fix(lsp): handle template literal as first arg in test function (#17076)Leo Kettmeir
2022-07-15refactor: allocate IDs for tests (#14729)Nayeem Rahman
2022-05-20refactor: upgrade to deno_ast 0.15 (#14680)David Sherret
2022-04-08fix: upgrade to swc_ecmascript 0.143 (#14238)David Sherret
2022-03-30feat(lsp): add experimental testing API (#13798)Kitson Kelly
Ref: denoland/vscode_deno#629