From f6d6f23c3030e939fc778cb6bb2d34172ae29f99 Mon Sep 17 00:00:00 2001 From: Matt <90358481+xbtmatt@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:44:10 -0800 Subject: [PATCH 1/2] Remove verbose flag for pre-commit Update config to mitigate flaky tests Update .eslintrc.js for the frontend --- .github/workflows/pre-commit.yaml | 2 +- src/typescript/frontend/.eslintrc.js | 3 ++- .../frontend/{playwright.config.ts => playwright.config.js} | 0 src/typescript/frontend/tests/tsconfig.json | 5 +---- src/typescript/sdk/tests/unit/sleep.test.ts | 2 ++ 5 files changed, 6 insertions(+), 6 deletions(-) rename src/typescript/frontend/{playwright.config.ts => playwright.config.js} (100%) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 6a9f76ed7..d1e19c587 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -61,7 +61,7 @@ jobs: path: './src/python/hooks/.venv' - uses: 'pre-commit/action@v3.0.0' with: - extra_args: '--all-files --config cfg/pre-commit-config.yaml --verbose' + extra_args: '--all-files --config cfg/pre-commit-config.yaml' name: 'pre-commit' 'on': pull_request: null diff --git a/src/typescript/frontend/.eslintrc.js b/src/typescript/frontend/.eslintrc.js index 6a41e681a..f133c9fa8 100644 --- a/src/typescript/frontend/.eslintrc.js +++ b/src/typescript/frontend/.eslintrc.js @@ -22,7 +22,8 @@ module.exports = { "node_modules/**", ".eslintrc.js", "config-overrides.js", - "playwright.config.ts", + "next.config.mjs", + "playwright.config.js", "postcss.config.js", "tailwind.config.js", "tests/**", diff --git a/src/typescript/frontend/playwright.config.ts b/src/typescript/frontend/playwright.config.js similarity index 100% rename from src/typescript/frontend/playwright.config.ts rename to src/typescript/frontend/playwright.config.js diff --git a/src/typescript/frontend/tests/tsconfig.json b/src/typescript/frontend/tests/tsconfig.json index c30c5f46b..e516b7faf 100644 --- a/src/typescript/frontend/tests/tsconfig.json +++ b/src/typescript/frontend/tests/tsconfig.json @@ -1,7 +1,4 @@ { "extends": "../tsconfig.json", - "include": [ - "**/*.ts", - "../playwright.config.ts" - ] + "include": ["**/*.ts"] } diff --git a/src/typescript/sdk/tests/unit/sleep.test.ts b/src/typescript/sdk/tests/unit/sleep.test.ts index 1ac48e344..8066adee4 100644 --- a/src/typescript/sdk/tests/unit/sleep.test.ts +++ b/src/typescript/sdk/tests/unit/sleep.test.ts @@ -1,5 +1,7 @@ import { getTime, sleep, UNIT_OF_TIME_MULTIPLIERS, UnitOfTime } from "../../src"; +jest.retryTimes(3); + describe("sleep utility function with units of time", () => { it("converts units of time to milliseconds", () => { expect(UNIT_OF_TIME_MULTIPLIERS[UnitOfTime.Microseconds]).toEqual(0.001); From 747c871386579fe83aae1cbc8a2a66fd894dff7f Mon Sep 17 00:00:00 2001 From: Matt <90358481+xbtmatt@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:55:46 -0800 Subject: [PATCH 2/2] Update src/typescript/frontend/tests/tsconfig.json --- src/typescript/frontend/tests/tsconfig.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/typescript/frontend/tests/tsconfig.json b/src/typescript/frontend/tests/tsconfig.json index e516b7faf..105efec3f 100644 --- a/src/typescript/frontend/tests/tsconfig.json +++ b/src/typescript/frontend/tests/tsconfig.json @@ -1,4 +1,6 @@ { "extends": "../tsconfig.json", - "include": ["**/*.ts"] + "include": [ + "**/*.ts" + ] }