Skip to content

Commit df0f9c3

Browse files
authored
Add TS compile check before tests for core-owned packages (#2515)
1 parent ee57d26 commit df0f9c3

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

packages/analytics/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1515
"build": "rollup -c",
1616
"dev": "rollup -c -w",
17-
"test": "run-p lint test:browser",
18-
"test:browser": "karma start --single-run",
17+
"test": "yarn type-check && yarn run-p lint test:browser",
18+
"test:browser": "karma start --single-run --nocache",
19+
"type-check": "tsc -p . --noEmit",
1920
"prepare": "yarn build"
2021
},
2122
"peerDependencies": {

packages/analytics/testing/get-fake-firebase-services.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export function getFakeInstallations(
4646
return {
4747
getId: async () => fid,
4848
getToken: async () => 'authToken',
49+
onIdChange: () => () => undefined,
4950
delete: async () => undefined
5051
};
5152
}

packages/app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1919
"build": "rollup -c",
2020
"dev": "rollup -c -w",
21-
"test": "run-p lint test:browser test:node",
21+
"test": "yarn type-check && run-p lint test:browser test:node",
22+
"type-check": "tsc -p . --noEmit",
2223
"test:browser": "karma start --single-run",
2324
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
2425
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --opts ../../config/mocha.node.opts",

packages/component/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1616
"build": "rollup -c",
1717
"dev": "rollup -c -w",
18-
"test": "run-p lint test:browser test:node",
18+
"test": "yarn type-check && run-p lint test:browser test:node",
19+
"type-check": "tsc -p . --noEmit",
1920
"test:browser": "karma start --single-run",
2021
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --opts ../../config/mocha.node.opts",
2122
"prepare": "yarn build"

packages/functions/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1616
"build": "rollup -c",
1717
"dev": "rollup -c -w",
18-
"test": "run-p lint test:browser test:node",
18+
"test": "yarn type-check && run-p lint test:browser test:node",
19+
"type-check": "tsc -p . --noEmit",
1920
"test:browser": "karma start --single-run",
2021
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
2122
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file index.node.ts --opts ../../config/mocha.node.opts",

packages/template/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1717
"build": "rollup -c",
1818
"dev": "rollup -c -w",
19-
"test": "run-p lint test:browser test:node",
19+
"test": "yarn type-check && run-p lint test:browser test:node",
2020
"test:browser": "karma start --single-run",
2121
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --opts ../../config/mocha.node.opts",
22+
"type-check": "tsc -p . --noEmit",
2223
"prepare": "yarn build"
2324
},
2425
"peerDependencies": {

packages/util/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1616
"build": "rollup -c",
1717
"dev": "rollup -c -w",
18-
"test": "run-p lint test:browser test:node",
18+
"test": "yarn type-check && run-p lint test:browser test:node",
19+
"type-check": "tsc -p . --noEmit",
1920
"test:browser": "karma start --single-run",
2021
"test:node": "TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* --opts ../../config/mocha.node.opts",
2122
"prepare": "yarn build"

0 commit comments

Comments
 (0)