Skip to content

Commit af74a2c

Browse files
authored
Merge 13614e0 into 3ecfed2
2 parents 3ecfed2 + 13614e0 commit af74a2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+12362
-1386
lines changed

.detoxrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
"configurations": {
3+
"ios.sim.debug": {
4+
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/ReactNativeSemaphoreNew.app",
5+
"build": "xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/ReactNativeSemaphoreNew.xcworkspace -scheme ReactNativeSemaphoreNew -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES",
6+
"type": "ios.simulator",
7+
"name": "iPhone 11"
8+
},
9+
"ios.sim.release": {
10+
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/ReactNativeSemaphoreNew.app",
11+
"build": "xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/ReactNativeSemaphoreNew.xcworkspace -scheme ReactNativeSemaphoreNew -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES",
12+
"type": "ios.simulator",
13+
"name": "iPhone 11"
14+
},
15+
"android.emu.debug": {
16+
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
17+
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
18+
"type": "android.emulator",
19+
"name": "Pixel_4_API_28"
20+
},
21+
"android.emu.release": {
22+
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
23+
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
24+
"type": "android.emulator",
25+
"name": "Nexus_S_API_24"
26+
}
27+
},
28+
"test-runner": "jest"
29+
};

.eslintrc.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
1+
const prettierOptions = require('./.prettierrc');
2+
13
module.exports = {
24
root: true,
3-
extends: '@react-native-community',
5+
extends: [
6+
'prettier',
7+
'@react-native-community',
8+
'plugin:@typescript-eslint/eslint-recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
],
11+
plugins: ['prettier', 'jest', 'testing-library'],
12+
overrides: [
13+
{
14+
files: ['*.ts', '*.tsx'],
15+
rules: {
16+
'@typescript-eslint/no-unused-vars': [2, {args: 'none'}],
17+
},
18+
},
19+
],
20+
settings: {
21+
'import/resolver': {
22+
'babel-module': {},
23+
node: {
24+
extensions: ['.js', '.jsx', '.json', '.native.js'],
25+
},
26+
},
27+
},
28+
rules: {
29+
'prettier/prettier': ['error', prettierOptions],
30+
'@typescript-eslint/no-var-requires': 0,
31+
},
32+
env: {
33+
'jest/globals': true,
34+
},
435
globals: {
536
fetch: true,
637
it: true,
@@ -15,5 +46,6 @@ module.exports = {
1546
jasmine: true,
1647
beforeAll: true,
1748
afterAll: true,
49+
HermesInternal: true,
1850
},
1951
};

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.13.0
1+
14

.semaphore/semaphore.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ blocks:
6060
- brew tap wix/brew
6161
- brew install applesimutils
6262
- cache restore
63+
- nvm install 14
6364
- cd ios
6465
- pod install
6566
- cd ..

App.js

Lines changed: 0 additions & 124 deletions
This file was deleted.

App.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
*/
6+
7+
import React from 'react';
8+
import {StatusBar} from 'react-native';
9+
// import {enableScreens} from 'react-native-screens';
10+
11+
import Router from './app/router';
12+
13+
// enableScreens();
14+
15+
const App: React.FC = () => {
16+
return (
17+
<>
18+
<StatusBar barStyle="dark-content" />
19+
<Router />
20+
</>
21+
);
22+
};
23+
24+
export default App;

__tests__/App-test.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

__tests__/App-test.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import renderer from 'react-test-renderer';
2+
// import {fireEvent, render} from '@testing-library/react-native';
3+
4+
import React from 'react';
5+
import App from '../App';
6+
7+
jest.useFakeTimers();
8+
9+
describe('jest snapshot tests', () => {
10+
it('renders correctly', async () => {
11+
const tree = renderer.create(<App />).toJSON();
12+
expect(tree).toMatchSnapshot();
13+
});
14+
});

0 commit comments

Comments
 (0)