From d7e7eea87c110455b4ceb52f11e3f44edcd4f8af Mon Sep 17 00:00:00 2001 From: Yan Zhang Date: Wed, 3 Jan 2024 10:15:39 +0800 Subject: [PATCH] run mocha tests in parallel --- package.json | 2 +- test/clientOptions.test.ts | 2 ++ test/requestTracing.test.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bf89104..567bbb8b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dev": "rollup --config --watch", "lint": "eslint src/ test/", "fix-lint": "eslint src/ test/ --fix", - "test": "mocha out/test/*.test.{js,cjs,mjs} --timeout 15000" + "test": "mocha out/test/*.test.{js,cjs,mjs} --parallel" }, "repository": { "type": "git", diff --git a/test/clientOptions.test.ts b/test/clientOptions.test.ts index 2bf146f1..0b970d93 100644 --- a/test/clientOptions.test.ts +++ b/test/clientOptions.test.ts @@ -27,6 +27,8 @@ class HttpRequestCountPolicy { } describe("custom client options", function () { + this.timeout(15000); + const fakeEndpoint = "https://azure.azconfig.io"; beforeEach(() => { // Thus here mock it to reply 500, in which case the retry mechanism works. diff --git a/test/requestTracing.test.ts b/test/requestTracing.test.ts index aaedae20..616c7588 100644 --- a/test/requestTracing.test.ts +++ b/test/requestTracing.test.ts @@ -22,6 +22,8 @@ class HttpRequestHeadersPolicy { } describe("request tracing", function () { + this.timeout(15000); + const fakeEndpoint = "https://127.0.0.1"; // sufficient to test the request it sends out const headerPolicy = new HttpRequestHeadersPolicy(); const position: "perCall" | "perRetry" = "perCall";