Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update readme #85

Merged
merged 5 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ jobs:
skip-step: install
test-script: yarn test

- name: Tests
run: npm run test

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The React Native Template contains:
- [Redux](https://redux.js.org/) (v4.0.1) to help manage state
- [Redux Persist](https://github.com/rt2zz/redux-persist) (v5.10.0) to persist the Redux state
- [Redux Sagas](https://redux-saga.js.org) (v1.0.2) to separate side-effects and logic from state and UI logic
- [React Navigation](https://reactnavigation.org/) (v3.11.2) with a [`NavigationService`](app/services/NavigationService.js) to handle routing and navigation in the app, with a splash screen setup by default
- [React Navigation](https://reactnavigation.org/) (v3.11.2) with a [`NavigationService`](app/services/navigationService.js) to handle routing and navigation in the app, with a splash screen setup by default
- [reduxsauce](https://github.com/infinitered/reduxsauce) (v1.0.1) to facilitate using Redux
- [apisauce](https://github.com/infinitered/apisauce/) to make API calls (v0.19.0)
- [prettier](https://prettier.io/) and [eslint](https://eslint.org/) preconfigured for React Native
Comment on lines 81 to 87
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [52-138]

There are several markdown syntax issues related to list indentation and spacing around headings. These should be corrected to improve the readability of the document.

- ### Atomic Design for react native architecture
+ ### Atomic Design for React Native Architecture

- - **Atoms**
+ - **Atoms:**

- - **Molecules**
+ - **Molecules:**

- - **Organisms**
+ - **Organisms:**

- ### Running expo project
+ ### Running Expo Project

- ### Useful documentation
+ ### Useful Documentation

Expand Down
35 changes: 15 additions & 20 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ module.exports = {
'!app/app.js',
'!app/global-styles.js',
'!app/*/*/Loadable.{js,jsx}',
'!**/coverage/**',
'!**/coverage/**'
],
"reporters": [
"default",
reporters: [
'default',
[
"jest-sonar",
'jest-sonar',
{
"outputDirectory": "reports",
"outputName": "test-report.xml",
"relativeRootDir": "./",
"reportedFilePath": "relative"
outputDirectory: 'reports',
outputName: 'test-report.xml',
relativeRootDir: './',
reportedFilePath: 'relative'
}
]
],
Expand All @@ -26,23 +26,18 @@ module.exports = {
statements: 50,
branches: 50,
functions: 50,
lines: 50,
},
lines: 50
}
},
preset: 'react-native',
moduleDirectories: ['node_modules', 'app'],
moduleNameMapper: {
'@app(.*)$': '<rootDir>/app/$1',
'@(atoms|molecules|organisms)(.*)$': '<rootDir>/app/components/$1/$2',
'@(containers|components|services|utils|themes|scenes|navigators)(.*)$': '<rootDir>/app/$1/$2'
'@(containers|components|services|utils|themes|scenes|navigators)(.*)$':
'<rootDir>/app/$1/$2'
},
"setupFiles": [
"./node_modules/react-native-gesture-handler/jestSetup.js"
],
"setupFilesAfterEnv": [
"./setupTests.js"
],
"transformIgnorePatterns": [
"/node_modules/(?!react-native)/.+"
]
setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'],
setupFilesAfterEnv: ['./setupTests.js'],
transformIgnorePatterns: ['/node_modules/(?!react-native)/.+']
};
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;
7 changes: 4 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ sonar.projectKey=wednesday-solutions_react-native-template_AY7hdnRSB2n8RRmGoU2M
sonar.language=js
sonar.sources=.
sonar.tests=app
sonar.exclusions=**/android/**,**/ios/**,**/node_modules/**
sonar.exclusions=**/android/**,**/ios/**,**/tests/**/*.*,jest.config.js,setupTests.js
sonar.test.inclusions=**/*.test.js
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.testExecutionReportPaths=./reports/test-report.xml
sonar.test.exclusions=**/*.test.js
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.testExecutionReportPaths=reports/test-report.xml
sonar.sourceEncoding=UTF-8
Loading