diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dedc72d..f2fd8e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: main +name: Main Workflow on: push: branches: @@ -21,3 +21,11 @@ jobs: - name: Run Unit Tests run: npx jest + + - name: Create Test Report + uses: dorny/test-reporter@v1 + if: success() || failure() + with: + name: Jest Tests + path: reports/jest-*.xml + reporter: jest-junit \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index cb329d8..bd6100e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,11 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} **/ module.exports = { - preset: 'ts-jest' -} \ No newline at end of file + testEnvironment: "node", + transform: { + "^.+.tsx?$": ["ts-jest",{}], + }, + reporters: [ + 'default', + ['jest-junit', {outputDirectory: 'reports', outputName: 'jest-junit.xml'}] + ], + }; \ No newline at end of file