Skip to content
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
29 changes: 29 additions & 0 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/ReactNativeSemaphoreNew.app",
"build": "xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/ReactNativeSemaphoreNew.xcworkspace -scheme ReactNativeSemaphoreNew -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES",
"type": "ios.simulator",
"name": "iPhone 11"
},
"ios.sim.release": {
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/ReactNativeSemaphoreNew.app",
"build": "xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/ReactNativeSemaphoreNew.xcworkspace -scheme ReactNativeSemaphoreNew -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -UseModernBuildSystem=YES",
"type": "ios.simulator",
"name": "iPhone 11"
},
"android.emu.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.emulator",
"name": "Pixel_4_API_28"
},
"android.emu.release": {
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
"type": "android.emulator",
"name": "Nexus_S_API_24"
}
},
"test-runner": "jest"
};
34 changes: 33 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
const prettierOptions = require('./.prettierrc');

module.exports = {
root: true,
extends: '@react-native-community',
extends: [
'prettier',
'@react-native-community',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['prettier', 'jest', 'testing-library'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-unused-vars': [2, {args: 'none'}],
},
},
],
settings: {
'import/resolver': {
'babel-module': {},
node: {
extensions: ['.js', '.jsx', '.json', '.native.js'],
},
},
},
rules: {
'prettier/prettier': ['error', prettierOptions],
'@typescript-eslint/no-var-requires': 0,
},
env: {
'jest/globals': true,
},
globals: {
fetch: true,
it: true,
Expand All @@ -15,5 +46,6 @@ module.exports = {
jasmine: true,
beforeAll: true,
afterAll: true,
HermesInternal: true,
},
};
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.13.0
14
1 change: 1 addition & 0 deletions .semaphore/release-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ blocks:
- cache restore
- bundle install --path vendor/bundle
- cache store
- nvm install 14

# setup cocoapods
- cd ios
Expand Down
1 change: 1 addition & 0 deletions .semaphore/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ blocks:
- gem install bundler -v '2.1.4'
- bundle install --path vendor/bundle
- cache store
- nvm install 14

# setup cocoapods
- cd ios
Expand Down
1 change: 1 addition & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ blocks:
- brew tap wix/brew
- brew install applesimutils
- cache restore
- nvm install 14
- cd ios
- pod install
- cd ..
Expand Down
124 changes: 0 additions & 124 deletions App.js

This file was deleted.

24 changes: 24 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
*/

import React from 'react';
import {StatusBar} from 'react-native';
// import {enableScreens} from 'react-native-screens';

import Router from './app/router';

// enableScreens();

const App: React.FC = () => {
return (
<>
<StatusBar barStyle="dark-content" />
<Router />
</>
);
};

export default App;
34 changes: 0 additions & 34 deletions __tests__/App-test.js

This file was deleted.

14 changes: 14 additions & 0 deletions __tests__/App-test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import renderer from 'react-test-renderer';
// import {fireEvent, render} from '@testing-library/react-native';

import React from 'react';
import App from '../App';

jest.useFakeTimers();

describe('jest snapshot tests', () => {
it('renders correctly', async () => {
const tree = renderer.create(<App />).toJSON();
expect(tree).toMatchSnapshot();
});
});
Loading