From 0ef693cc8a55cec5f97eedbdcbf7a69de422f069 Mon Sep 17 00:00:00 2001 From: Timothy Wang Date: Tue, 7 Jan 2025 15:30:36 -0500 Subject: [PATCH] fix unit tests --- .github/workflows/detection-e2e-tests.yml | 2 +- src/core/func-core-tools.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/detection-e2e-tests.yml b/.github/workflows/detection-e2e-tests.yml index a70e8952d..54d518304 100644 --- a/.github/workflows/detection-e2e-tests.yml +++ b/.github/workflows/detection-e2e-tests.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 14.x + node-version: 18.x - name: Test framework detection run: | npm ci diff --git a/src/core/func-core-tools.spec.ts b/src/core/func-core-tools.spec.ts index b832586ef..49c70a68c 100644 --- a/src/core/func-core-tools.spec.ts +++ b/src/core/func-core-tools.spec.ts @@ -147,7 +147,7 @@ describe("funcCoreTools", () => { }, }); - await expect(async () => await fct.getLatestCoreToolsRelease(4)).rejects.toThrowError("Cannot find the latest version for v4"); + await expect(async () => await fct.getLatestCoreToolsRelease(4)).rejects.toThrowError("Error fetching Function Core Tools releases"); }); it("should throw an error if no release match the specified version", async () => { @@ -158,7 +158,7 @@ describe("funcCoreTools", () => { releases: {}, }); - await expect(async () => await fct.getLatestCoreToolsRelease(4)).rejects.toThrowError("Cannot find release for 4.0.0"); + await expect(async () => await fct.getLatestCoreToolsRelease(4)).rejects.toThrowError("Error fetching Function Core Tools releases"); }); it("should throw an error if there's no compatible package", async () => {