From 83caa56926afc1c440f8e22ff4858b942fdb2e75 Mon Sep 17 00:00:00 2001 From: Boshen Date: Sun, 19 Jan 2025 12:07:15 +0800 Subject: [PATCH] fix(tasks/prettier_conformance): enable test coverage --- tasks/prettier_conformance/src/lib.rs | 7 +++++++ tasks/prettier_conformance/src/main.rs | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/prettier_conformance/src/lib.rs b/tasks/prettier_conformance/src/lib.rs index fe4c61ef3699e..83a9e2d19a63f 100644 --- a/tasks/prettier_conformance/src/lib.rs +++ b/tasks/prettier_conformance/src/lib.rs @@ -17,6 +17,13 @@ use oxc_span::SourceType; use crate::{ignore_list::IGNORE_TESTS, options::TestRunnerOptions, spec::parse_spec}; +#[test] +#[cfg(any(coverage, coverage_nightly))] +fn test() { + TestRunner::new(TestRunnerOptions { filter: None, language: TestLanguage::Js }).run(); + TestRunner::new(TestRunnerOptions { filter: None, language: TestLanguage::Ts }).run(); +} + fn root() -> PathBuf { oxc_tasks_common::project_root().join("tasks").join("prettier_conformance") } diff --git a/tasks/prettier_conformance/src/main.rs b/tasks/prettier_conformance/src/main.rs index 8edb48cebab29..099e46ff90306 100644 --- a/tasks/prettier_conformance/src/main.rs +++ b/tasks/prettier_conformance/src/main.rs @@ -15,10 +15,3 @@ fn main() { TestRunner::new(TestRunnerOptions { filter: filter.clone(), language: TestLanguage::Js }).run(); TestRunner::new(TestRunnerOptions { filter: filter.clone(), language: TestLanguage::Ts }).run(); } - -#[test] -#[cfg(any(coverage, coverage_nightly))] -fn test() { - TestRunner::new(TestRunnerOptions { filter: None, language: TestLanguage::Js }).run(); - TestRunner::new(TestRunnerOptions { filter: None, language: TestLanguage::Ts }).run(); -}