Skip to content

Commit

Permalink
Run tests for each package in isolation for mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
louiszawadzki committed Oct 26, 2023
1 parent c1ce5f7 commit 0f14db3
Show file tree
Hide file tree
Showing 10 changed files with 354 additions and 307 deletions.
147 changes: 66 additions & 81 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,69 @@
{
"name": "dd-sdk-reactnative",
"description": "A client-side React Native module to interact with Datadog",
"keywords": [
"datadog",
"react-native",
"ios",
"android"
],
"author": "Datadog (https://github.com/DataDog)",
"homepage": "https://github.com/DataDog/dd-sdk-reactnative#readme",
"repository": "https://github.com/DataDog/dd-sdk-reactnative",
"bugs": {
"url": "https://github.com/DataDog/dd-sdk-reactnative/issues"
},
"license": "Apache-2.0",
"private": true,
"workspaces": {
"packages": [
"packages/*",
"example",
"example-new-architecture"
]
},
"scripts": {
"prepare": "genversion --es6 --semi packages/core/src/version.ts && lerna run prepare",
"test": "genversion --es6 --semi packages/core/src/version.ts && jest",
"lint": "genversion --es6 --semi packages/core/src/version.ts && eslint .",
"example": "yarn --cwd example",
"postinstall": "./packages/react-navigation/fix-react-navigation-import-in-dependencies.sh"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "7.12.15",
"@testing-library/react-native": "7.0.2",
"@types/jest": "^29.2.1",
"@types/react": "^18.0.24",
"@types/react-native": "0.71.0",
"@types/react-test-renderer": "18.0.0",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"dd-trace": "^3.3.1",
"eslint": "8.10.0",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-arca": "0.15.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.22.0",
"eslint-plugin-react-hooks": "4.3.0",
"eslint-plugin-react-native": "3.10.0",
"genversion": "3.0.2",
"jest": "29.2.1",
"lerna": "7.1.0",
"metro-react-native-babel-preset": "0.73.9",
"pod-install": "0.1.14",
"prettier": "2.2.0",
"react": "18.2.0",
"react-native": "0.71.10",
"react-native-builder-bob": "0.17.1",
"react-native-webview": "11.26.1",
"react-test-renderer": "18.1.0",
"typescript": "4.8.4"
},
"jest": {
"preset": "react-native",
"moduleNameMapper": {
"@datadog/mobile-react-native": "<rootDir>/packages/core/src"
},
"modulePathIgnorePatterns": [
"<rootDir>/example/node_modules",
"<rootDir>/packages/.*/lib/"
],
"setupFiles": [
"./node_modules/react-native-gesture-handler/jestSetup.js",
"./jest.setup.js"
"name": "dd-sdk-reactnative",
"description": "A client-side React Native module to interact with Datadog",
"keywords": [
"datadog",
"react-native",
"ios",
"android"
],
"testPathIgnorePatterns": [
"/__utils__/"
],
"transformIgnorePatterns": [
"jest-runner"
]
},
"packageManager": "yarn@3.4.1"
"author": "Datadog (https://github.com/DataDog)",
"homepage": "https://github.com/DataDog/dd-sdk-reactnative#readme",
"repository": "https://github.com/DataDog/dd-sdk-reactnative",
"bugs": {
"url": "https://github.com/DataDog/dd-sdk-reactnative/issues"
},
"license": "Apache-2.0",
"private": true,
"workspaces": {
"packages": [
"packages/*",
"example",
"example-new-architecture"
]
},
"scripts": {
"prepare": "genversion --es6 --semi packages/core/src/version.ts && lerna run prepare",
"test": "genversion --es6 --semi packages/core/src/version.ts && jest",
"lint": "genversion --es6 --semi packages/core/src/version.ts && eslint .",
"example": "yarn --cwd example",
"postinstall": "./packages/react-navigation/fix-react-navigation-import-in-dependencies.sh"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "7.12.15",
"@testing-library/react-native": "7.0.2",
"@types/jest": "^29.2.1",
"@types/react": "^18.0.24",
"@types/react-native": "0.71.0",
"@types/react-test-renderer": "18.0.0",
"@typescript-eslint/eslint-plugin": "5.20.0",
"@typescript-eslint/parser": "5.20.0",
"dd-trace": "^3.3.1",
"eslint": "8.10.0",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-arca": "0.15.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.22.0",
"eslint-plugin-react-hooks": "4.3.0",
"eslint-plugin-react-native": "3.10.0",
"genversion": "3.0.2",
"jest": "29.2.1",
"lerna": "7.1.0",
"metro-react-native-babel-preset": "0.73.9",
"pod-install": "0.1.14",
"prettier": "2.2.0",
"react": "18.2.0",
"react-native": "0.71.10",
"react-native-builder-bob": "0.17.1",
"react-native-webview": "11.26.1",
"react-test-renderer": "18.1.0",
"typescript": "4.8.4"
},
"jest": {
"projects": [
"<rootDir>/packages/*"
]
},
"packageManager": "yarn@3.4.1"
}
149 changes: 77 additions & 72 deletions packages/codepush/package.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,81 @@
{
"name": "@datadog/mobile-react-native-code-push",
"version": "1.8.5",
"description": "A client-side React Native module to interact with Appcenter Codepush and Datadog",
"keywords": [
"datadog",
"react-native",
"ios",
"android",
"codepush",
"appcenter"
],
"author": "Datadog (https://github.com/DataDog)",
"homepage": "https://github.com/DataDog/dd-sdk-reactnative#readme",
"repository": {
"url": "https://github.com/DataDog/dd-sdk-reactnative",
"directory": "packages/codepush"
},
"bugs": {
"url": "https://github.com/DataDog/dd-sdk-reactnative/issues"
},
"license": "Apache-2.0",
"main": "lib/commonjs/index",
"files": [
"src/**",
"lib/**"
],
"types": "lib/typescript/codepush/src/index.d.ts",
"react-native": "src/index",
"source": "src/index",
"module": "lib/module/index",
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "jest",
"lint": "eslint .",
"prepare": "rm -rf lib && yarn bob build"
},
"devDependencies": {
"@datadog/mobile-react-native": "^1.8.5",
"@testing-library/react-native": "7.0.2",
"react-native-builder-bob": "0.17.1",
"react-native-code-push": "7.0.5"
},
"peerDependencies": {
"@datadog/mobile-react-native": "^1.0.0-beta4",
"react": ">=16.13.1",
"react-native": ">=0.63.4 <1.0",
"react-native-code-push": ">=2.0.0"
},
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/lib/"
"name": "@datadog/mobile-react-native-code-push",
"version": "1.8.5",
"description": "A client-side React Native module to interact with Appcenter Codepush and Datadog",
"keywords": [
"datadog",
"react-native",
"ios",
"android",
"codepush",
"appcenter"
],
"testPathIgnorePatterns": [
"/__utils__/"
"author": "Datadog (https://github.com/DataDog)",
"homepage": "https://github.com/DataDog/dd-sdk-reactnative#readme",
"repository": {
"url": "https://github.com/DataDog/dd-sdk-reactnative",
"directory": "packages/codepush"
},
"bugs": {
"url": "https://github.com/DataDog/dd-sdk-reactnative/issues"
},
"license": "Apache-2.0",
"main": "lib/commonjs/index",
"files": [
"src/**",
"lib/**"
],
"transformIgnorePatterns": []
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
[
"typescript",
{
"tsc": "./../../node_modules/.bin/tsc"
}
]
]
}
"types": "lib/typescript/codepush/src/index.d.ts",
"react-native": "src/index",
"source": "src/index",
"module": "lib/module/index",
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "jest",
"lint": "eslint .",
"prepare": "rm -rf lib && yarn bob build"
},
"devDependencies": {
"@datadog/mobile-react-native": "^1.8.5",
"@testing-library/react-native": "7.0.2",
"react-native-builder-bob": "0.17.1",
"react-native-code-push": "7.0.5"
},
"peerDependencies": {
"@datadog/mobile-react-native": "^1.0.0-beta4",
"react": ">=16.13.1",
"react-native": ">=0.63.4 <1.0",
"react-native-code-push": ">=2.0.0"
},
"jest": {
"preset": "react-native",
"moduleNameMapper": {
"@datadog/mobile-react-native": "<rootDir>../core/src"
},
"modulePathIgnorePatterns": [
"<rootDir>/lib/"
],
"testPathIgnorePatterns": [
"/__utils__/"
],
"transformIgnorePatterns": [
"jest-runner"
]
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
[
"typescript",
{
"tsc": "./../../node_modules/.bin/tsc"
}
]
]
}
}
10 changes: 9 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,22 @@
},
"jest": {
"preset": "react-native",
"moduleNameMapper": {
"@datadog/mobile-react-native": "<rootDir>../core/src"
},
"modulePathIgnorePatterns": [
"<rootDir>/lib/"
],
"testPathIgnorePatterns": [
"/__utils__/"
],
"setupFiles": [
"./../../node_modules/react-native-gesture-handler/jestSetup.js",
"./../../jest.setup.js"
],
"transformIgnorePatterns": []
"transformIgnorePatterns": [
"jest-runner"
]
},
"react-native-builder-bob": {
"source": "src",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-native-apollo-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,18 @@
},
"jest": {
"preset": "react-native",
"moduleNameMapper": {
"@datadog/mobile-react-native": "<rootDir>../core/src"
},
"modulePathIgnorePatterns": [
"<rootDir>/lib/"
],
"testPathIgnorePatterns": [
"/__utils__/"
],
"transformIgnorePatterns": []
"transformIgnorePatterns": [
"jest-runner"
]
},
"react-native-builder-bob": {
"source": "src",
Expand Down
Loading

0 comments on commit 0f14db3

Please sign in to comment.