mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
d28384c3de
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:
|
||
---|---|---|
.. | ||
testing | ||
analysis.rs | ||
cache.rs | ||
capabilities.rs | ||
client.rs | ||
code_lens.rs | ||
completions.rs | ||
config.rs | ||
diagnostics.rs | ||
documents.rs | ||
language_server.rs | ||
logging.rs | ||
lsp_custom.rs | ||
mod.rs | ||
npm.rs | ||
parent_process_checker.rs | ||
path_to_regex.rs | ||
performance.rs | ||
README.md | ||
refactor.rs | ||
registries.rs | ||
repl.rs | ||
semantic_tokens.rs | ||
text.rs | ||
tsc.rs | ||
urls.rs |
Deno Language Server
The Deno Language Server provides a server implementation of the
Language Server Protocol
which is specifically tailored to provide a Deno view of code. It is
integrated into the command line and can be started via the lsp
sub-command.
This documentation has been moved to the Deno manual.