Skip to content

Commit

Permalink
fix: split tests by dir & ignore outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kacper-cyra committed Oct 6, 2023
1 parent 61addc1 commit dcbef95
Show file tree
Hide file tree
Showing 11 changed files with 3,572 additions and 3,436 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
"no-underscore-dangle": 0,
"@typescript-eslint/naming-convention": 0,
"import/no-default-export": 0,
"@typescript-eslint/no-shadow": 0
"@typescript-eslint/no-shadow": 0,
"global-require": 0,
"@typescript-eslint/no-var-requires": 0
}
}
]
Expand Down
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ node_modules/warning/.*
!<PROJECT_ROOT>/node_modules/react-native/
<PROJECT_ROOT>/node_modules/react-native/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts

; Output files
<PROJECT_ROOT>/lib/.*
<PROJECT_ROOT>/test_project/.*

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Outputs
plugin/build
lib
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
roots: ['<rootDir>/__tests__'],
preset: 'react-native'
}
4,912 changes: 2,401 additions & 2,511 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
],
"scripts": {
"build": "babel src/ -d lib/",
"test": "jest",
"test": "yarn test:package ; yarn test:example ; yarn test:plugin",
"test:package": "jest --config jest.config.js --passWithNoTests",
"test:example": "jest --config example/jest.config.js",
"docs": "documentation build src/index.js -o docs --config documentation.yml -f html",
"typecheck": "tsc --noEmit",
"lint": "flow && eslint \"**/*.{js,ts,tsx}\" && documentation lint index.js && yarn typecheck",
Expand All @@ -43,6 +45,7 @@
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
"build:plugin": "tsc --build plugin",
"clean:plugin": "expo-module clean plugin",
"test:plugin": "jest --config plugin/jest.config.js",
"prepare": "npm run clean:plugin && npm run build:plugin",
"lint:plugin": "eslint plugin/src/*"
},
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/withBLE.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AndroidConfig, ConfigPlugin, createRunOncePlugin, WarningAggregator } from '@expo/config-plugins'
import { AndroidConfig, type ConfigPlugin, createRunOncePlugin, WarningAggregator } from '@expo/config-plugins'

import { withBLEAndroidManifest } from './withBLEAndroidManifest'
import { BackgroundMode, withBLEBackgroundModes } from './withBLEBackgroundModes'
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/withBLEAndroidManifest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConfigPlugin, withAndroidManifest, AndroidConfig } from '@expo/config-plugins'
import { type ConfigPlugin, withAndroidManifest, AndroidConfig } from '@expo/config-plugins'

type InnerManifest = AndroidConfig.Manifest.AndroidManifest['manifest']

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/withBLEBackgroundModes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConfigPlugin, withInfoPlist } from '@expo/config-plugins'
import { type ConfigPlugin, withInfoPlist } from '@expo/config-plugins'

export enum BackgroundMode {
Central = 'central',
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/withBluetoothPermissions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConfigPlugin, withInfoPlist } from '@expo/config-plugins'
import { type ConfigPlugin, withInfoPlist } from '@expo/config-plugins'

const BLUETOOTH_ALWAYS = 'Allow $(PRODUCT_NAME) to connect to bluetooth devices'

Expand Down
2,068 changes: 1,149 additions & 919 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit dcbef95

Please sign in to comment.