diff --git a/.github/workflows/cypress-testing.yml b/.github/workflows/cypress-testing.yml index bb0ce75..eadd68e 100644 --- a/.github/workflows/cypress-testing.yml +++ b/.github/workflows/cypress-testing.yml @@ -1,10 +1,8 @@ name: Run Cypress testing suite on: workflow_dispatch: - push: - branches: - - development pull_request: + types: [ opened, synchronize ] jobs: cypress-run: diff --git a/.github/workflows/jest-testing.yml b/.github/workflows/jest-testing.yml index 208cf7b..b8a785d 100644 --- a/.github/workflows/jest-testing.yml +++ b/.github/workflows/jest-testing.yml @@ -1,10 +1,8 @@ name: Run Jest testing suite on: workflow_dispatch: - push: - branches: - - development pull_request: + types: [ opened, synchronize ] env: NODE_ENV: "test" diff --git a/.github/workflows/knip.yml b/.github/workflows/knip.yml index df68bda..b686ba2 100644 --- a/.github/workflows/knip.yml +++ b/.github/workflows/knip.yml @@ -2,6 +2,7 @@ name: Knip on: pull_request: + workflow_dispatch: permissions: write-all @@ -27,4 +28,4 @@ jobs: comment_id: ${{ github.workflow }}-reporter command_script_name: knip-ci annotations: true - ignore_results: false \ No newline at end of file + ignore_results: false diff --git a/tests/main.test.ts b/tests/main.test.ts index 7967004..d891c3c 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -1,3 +1,4 @@ +import { mainModule } from "../static/main"; import { db } from "./__mocks__/db"; import { server } from "./__mocks__/node"; import usersGet from "./__mocks__/users-get.json"; @@ -18,5 +19,6 @@ describe("User tests", () => { const res = await fetch("https://api.ubiquity.com/users"); const data = await res.json(); expect(data).toMatchObject(usersGet); + expect(async () => await mainModule()).not.toThrow(); }); });