Skip to content

Commit

Permalink
feat: bump up jest
Browse files Browse the repository at this point in the history
  • Loading branch information
alichherawalla committed Apr 15, 2024
1 parent 830ac07 commit 04665e1
Show file tree
Hide file tree
Showing 4 changed files with 1,300 additions and 541 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ jobs:
- name: Lint
run: npm run lint

- name: test
run: npm run test

# - name: Test and generate coverage report
# uses: artiomtr/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# threshold: 80
# package-manager: yarn
# skip-step: install
# test-script: yarn test
- name: Test and generate coverage report
uses: artiomtr/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
threshold: 80
package-manager: yarn
skip-step: install
test-script: yarn test

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"eslint-plugin-redux-saga": "^1.1.1",
"eslint-plugin-standard": "^4.0.0",
"husky": "^3.0.8",
"jest": "^24.5.0",
"jest": "^25.5.4",
"jest-sonar": "^0.2.16",
"pre-commit": "1.2.2",
"prettier": "^1.18.2",
Expand Down
9 changes: 9 additions & 0 deletions setupTests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import mockAsyncStorage from '@react-native-async-storage/async-storage/jest/async-storage-mock';

jest.mock('@react-native-async-storage/async-storage', () => mockAsyncStorage);

jest.mock('redux-persist', () => {
const real = jest.requireActual('redux-persist');
return {
...real,
persistReducer: jest.fn().mockImplementation((config, reducers) => reducers)
};
});

console.disableYellowBox = true;
Loading

0 comments on commit 04665e1

Please sign in to comment.