Skip to content

Commit

Permalink
Merge pull request wso2#2836 from brionmario/fix-unit-test-suite
Browse files Browse the repository at this point in the history
Add support to Mock API calls in Unit Tests + Improve Coverage
  • Loading branch information
brionmario authored Feb 21, 2022
2 parents 54970f4 + d6ec696 commit a9834ea
Show file tree
Hide file tree
Showing 54 changed files with 14,427 additions and 1,738 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,17 @@ jobs:
id: build-reusable-modules
run: npm run build:modules

- name: 🃏 Run jest
- name: 🃏 Run Jest & Collect Coverage
id: run-jest-test-and-coverage
run: npm run test:unit:coverage

- name: 🤖 Aggregate Test Coverage
id: aggregate-coverage-reports
run: |
npm run test:unit:coverage:aggregate
npm run nyc:text-summary-report
npm run nyc:text-report
- name: 🔆 Cache NPM directory
id: cache-npm-modules
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion apps/console/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = {
"<rootDir>/test-configs/__mocks__/file.ts",
"\\.svg": "<rootDir>/test-configs/__mocks__/svgr.ts",
"^@unit-testing(.*)$": "<rootDir>/test-configs/utils",
"^lodash-es": "<rootDir>/../../node_modules/lodash",
"^lodash-es/(.*)$": "<rootDir>/../../node_modules/lodash/$1",
"^react($|/.+)": "<rootDir>/../../node_modules/react$1"
},
modulePaths: [
Expand Down
Loading

0 comments on commit a9834ea

Please sign in to comment.