From eb89e53a17e07a5b76f49355073d0573775f3f36 Mon Sep 17 00:00:00 2001 From: Mingzhe Huang Date: Mon, 2 Sep 2024 14:46:08 +0800 Subject: [PATCH] fix(build): no test case will throw error `vitest` will throw error by default if no test is found. To suppress this error, we need to add `--passWithNoTests` to the options. An alternative is to set up a `vitest.config` file and define that option. That's probably overdone since emitter codes are no longer maintained here. --- eng/scripts/Test-Packages.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/Test-Packages.ps1 b/eng/scripts/Test-Packages.ps1 index 9a0f4a309a7..7f4db5d02af 100644 --- a/eng/scripts/Test-Packages.ps1 +++ b/eng/scripts/Test-Packages.ps1 @@ -37,7 +37,7 @@ try { Invoke-LoggedCommand "npm run prettier" -GroupOutput Invoke-LoggedCommand "npm run lint" -GroupOutput Invoke-LoggedCommand "npm run build" -GroupOutput - Invoke-LoggedCommand "npm run test" -GroupOutput + Invoke-LoggedCommand "npm run test -- --passWithNoTests" -GroupOutput } finally { Pop-Location