From d9d9d90ec105d0973fb267d5c1e315fb2dbd809d Mon Sep 17 00:00:00 2001 From: Rizart Dokollari Date: Mon, 19 Aug 2024 07:51:25 +0100 Subject: [PATCH] chore: Freeze CI node version. --- .github/workflows/check.yml | 8 ++++---- jest/setupFilesAfterEnv.ts | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 479d60f..f65da97 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout codebase uses: actions/checkout@v4 - uses: actions/setup-node@v4 - with: { node-version: "18", cache: "yarn" } + with: { node-version: "18.18", cache: "yarn" } - name: Prettier run: make prettier @@ -24,7 +24,7 @@ jobs: - name: Checkout codebase uses: actions/checkout@v4 - uses: actions/setup-node@v4 - with: { node-version: "18", cache: "yarn" } + with: { node-version: "18.18", cache: "yarn" } - name: Run linter run: make lint @@ -34,7 +34,7 @@ jobs: - name: Checkout codebase uses: actions/checkout@v4 - uses: actions/setup-node@v4 - with: { node-version: "18", cache: "yarn" } + with: { node-version: "18.18", cache: "yarn" } - name: Build & bundle run: make bundle @@ -44,6 +44,6 @@ jobs: - name: Checkout codebase uses: actions/checkout@v4 - uses: actions/setup-node@v4 - with: { node-version: "18", cache: "yarn" } + with: { node-version: "18.18", cache: "yarn" } - name: Run tests run: make test diff --git a/jest/setupFilesAfterEnv.ts b/jest/setupFilesAfterEnv.ts index dbf8380..3ba00b8 100644 --- a/jest/setupFilesAfterEnv.ts +++ b/jest/setupFilesAfterEnv.ts @@ -4,7 +4,11 @@ global.console = { error: jest.fn(), }; -beforeEach(() => {}); +beforeEach(() => { + Object.defineProperty(global, "performance", { + writable: true, + }); +}); afterEach(() => { // To mock modules from reusable make functions.