mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
feat(lsp): add experimental testing API (#13798)
Ref: denoland/vscode_deno#629
This commit is contained in:
parent
4a0b2c28a1
commit
061090de7e
20 changed files with 2608 additions and 52 deletions
|
@ -58,7 +58,7 @@ use tokio::sync::mpsc::UnboundedSender;
|
|||
|
||||
/// The test mode is used to determine how a specifier is to be tested.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
enum TestMode {
|
||||
pub enum TestMode {
|
||||
/// Test as documentation, type-checking fenced code blocks.
|
||||
Documentation,
|
||||
/// Test as an executable module, loading the module into the isolate and running each test it
|
||||
|
@ -163,7 +163,7 @@ struct TestSpecifierOptions {
|
|||
}
|
||||
|
||||
impl TestSummary {
|
||||
fn new() -> TestSummary {
|
||||
pub fn new() -> TestSummary {
|
||||
TestSummary {
|
||||
total: 0,
|
||||
passed: 0,
|
||||
|
@ -188,7 +188,7 @@ impl TestSummary {
|
|||
}
|
||||
}
|
||||
|
||||
trait TestReporter {
|
||||
pub trait TestReporter {
|
||||
fn report_plan(&mut self, plan: &TestPlan);
|
||||
fn report_wait(&mut self, description: &TestDescription);
|
||||
fn report_output(&mut self, output: &TestOutput);
|
||||
|
@ -718,7 +718,7 @@ async fn fetch_inline_files(
|
|||
}
|
||||
|
||||
/// Type check a collection of module and document specifiers.
|
||||
async fn check_specifiers(
|
||||
pub async fn check_specifiers(
|
||||
ps: &ProcState,
|
||||
permissions: Permissions,
|
||||
specifiers: Vec<(ModuleSpecifier, TestMode)>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue