Skip to content

Commit fc5f36e

Browse files
committed
test: add import tests for all packages
1 parent 1134b80 commit fc5f36e

File tree

24 files changed

+64
-9
lines changed

24 files changed

+64
-9
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unassigned-import
2+
import "../src/index.js"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["**/*.ts"]
4+
}

packages/ci-log/jest.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import jestConfig from "../../jest.config.mjs"
2+
export default jestConfig

packages/ci-log/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"scripts": {
1313
"build": "tsc --pretty",
1414
"dev": "tsc --watch --pretty",
15+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
1516
"lint.tsc": "tsc --noEmit --pretty",
1617
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
17-
"prepublishOnly": "pnpm run build"
18+
"prepublishOnly": "pnpm run build",
19+
"test": "jest --coverage"
1820
},
1921
"dependencies": {
2022
"@actions/core": "^1.10.1",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unassigned-import
2+
import "../src/index.js"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["**/*.ts"]
4+
}

packages/envosman/jest.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import jestConfig from "../../jest.config.mjs"
2+
export default jestConfig

packages/envosman/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"scripts": {
1313
"build": "tsc --pretty",
1414
"dev": "tsc --watch --pretty",
15+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
1516
"lint.tsc": "tsc --noEmit --pretty",
1617
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
17-
"prepublishOnly": "pnpm run build"
18+
"prepublishOnly": "pnpm run build",
19+
"test": "jest --coverage"
1820
},
1921
"dependencies": {
2022
"@actions/core": "^1.10.1",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unassigned-import
2+
import "../src/index.js"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["**/*.ts"]
4+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import jestConfig from "../../jest.config.mjs"
2+
export default jestConfig

packages/exec-powershell/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"scripts": {
1313
"build": "tsc --pretty",
1414
"dev": "tsc --watch --pretty",
15+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
1516
"lint.tsc": "tsc --noEmit --pretty",
1617
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
17-
"prepublishOnly": "pnpm run build"
18+
"prepublishOnly": "pnpm run build",
19+
"test": "jest --coverage"
1820
},
1921
"dependencies": {
2022
"execa": "7.2.0",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unassigned-import
2+
import "../src/index.js"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["**/*.ts"]
4+
}

packages/setup-alpine/jest.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import jestConfig from "../../jest.config.mjs"
2+
export default jestConfig

packages/setup-alpine/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
"scripts": {
1818
"build": "tsc --pretty",
1919
"dev": "tsc --watch --pretty",
20+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
2021
"lint.tsc": "tsc --noEmit --pretty",
2122
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
22-
"prepublishOnly": "pnpm run build"
23+
"prepublishOnly": "pnpm run build",
24+
"test": "jest --coverage"
2325
},
2426
"dependencies": {
2527
"@types/node": "22.15.3",

packages/setup-apt/__tests__/testBin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type spawn from "cross-spawn"
1+
import spawn from "cross-spawn"
22
import { pathExists } from "path-exists"
33
import { join } from "path/posix"
44
import { addExeExt } from "patha"
5-
import type which from "which"
5+
import which from "which"
66

77
export async function testBin(
88
name: string,

packages/setup-apt/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"scripts": {
1818
"build": "tsc --pretty",
1919
"dev": "tsc --watch --pretty",
20+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
2021
"lint.tsc": "tsc --noEmit --pretty",
2122
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
2223
"prepublishOnly": "pnpm run build",

packages/setup-brew/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"scripts": {
1818
"build": "tsc --pretty",
1919
"dev": "tsc --watch --pretty",
20+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
2021
"lint.tsc": "tsc --noEmit --pretty",
2122
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
2223
"prepublishOnly": "pnpm run build",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unassigned-import
2+
import "../src/index.js"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["**/*.ts"]
4+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import jestConfig from "../../jest.config.mjs"
2+
export default jestConfig

packages/untildify-user/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"scripts": {
1313
"build": "tsc --pretty",
1414
"dev": "tsc --watch --pretty",
15+
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
1516
"lint.tsc": "tsc --noEmit --pretty",
1617
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
17-
"prepublishOnly": "pnpm run build"
18+
"prepublishOnly": "pnpm run build",
19+
"test": "jest --coverage"
1820
},
1921
"dependencies": {
2022
"admina": "1.0.1"

turbo.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
"cache": false
1212
},
1313
"lint.tsc": {
14-
"dependsOn": ["build", "^lint.tsc"]
14+
"dependsOn": ["build", "^lint.tsc", "lint.tsc.test"]
15+
},
16+
"lint.tsc.test": {
17+
"dependsOn": ["^lint.tsc.test"]
1518
},
1619
"lint.eslint": {
17-
"dependsOn": ["build", "^lint.eslint"]
20+
"dependsOn": ["^lint.eslint"]
1821
},
1922
"lint": {
2023
"dependsOn": ["lint.tsc", "lint.eslint"]

0 commit comments

Comments
 (0)