diff --git a/biome.jsonc b/biome.jsonc index 9058a6f8..e8cfcab8 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -8,6 +8,7 @@ "dev/cpp_vcpkg_project/**/*", "**/.venv/", "**/.*cache/", + "coverage/", "**/coverage/" ], "ignoreUnknown": true diff --git a/jest.config.ts b/jest.config.mjs similarity index 87% rename from jest.config.ts rename to jest.config.mjs index bf908016..5e04b6ba 100644 --- a/jest.config.ts +++ b/jest.config.mjs @@ -1,6 +1,7 @@ -import type { Config } from "jest" - -const jestConfig: Config = { +/** + * @type {import('jest').Config} + */ +const jestConfig = { testMatch: ["**/*.test.ts"], testEnvironment: "node", extensionsToTreatAsEsm: [".ts", ".tsx", ".jsx"], diff --git a/package.json b/package.json index 75956ac1..6e485aca 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "test.lint.root.eslint": "eslint ./{src,dev}/**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/", "test.lint.biome": "biome check", "test.lint.dprint": "dprint check", - "test": "jest --runInBand --forceExit --coverage", + "test": "turbo test && jest --runInBand --forceExit --coverage", "build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs" }, "devDependencies": { diff --git a/packages/ci-log/package.json b/packages/ci-log/package.json index 9a9fb9b4..c696412c 100644 --- a/packages/ci-log/package.json +++ b/packages/ci-log/package.json @@ -8,6 +8,7 @@ "author": "Amin Yahyaabadi", "main": "./dist/index.js", "source": "./src/index.ts", + "type": "module", "scripts": { "build": "tsc --pretty", "dev": "tsc --watch --pretty", diff --git a/packages/envosman/package.json b/packages/envosman/package.json index 72e7b5d5..c6a1ba3b 100644 --- a/packages/envosman/package.json +++ b/packages/envosman/package.json @@ -8,6 +8,7 @@ "author": "Amin Yahyaabadi", "main": "./dist/index.js", "source": "./src/index.ts", + "type": "module", "scripts": { "build": "tsc --pretty", "dev": "tsc --watch --pretty", diff --git a/packages/exec-powershell/package.json b/packages/exec-powershell/package.json index 18f92e2f..a09b182e 100644 --- a/packages/exec-powershell/package.json +++ b/packages/exec-powershell/package.json @@ -8,6 +8,7 @@ "author": "Amin Yahyaabadi", "main": "./dist/index.js", "source": "./src/index.ts", + "type": "module", "scripts": { "build": "tsc --pretty", "dev": "tsc --watch --pretty", diff --git a/packages/setup-apt/package.json b/packages/setup-apt/package.json index 804d8455..cc551f6b 100644 --- a/packages/setup-apt/package.json +++ b/packages/setup-apt/package.json @@ -8,6 +8,7 @@ "author": "Amin Yahyaabadi", "main": "./dist/index.js", "source": "./src/index.ts", + "type": "module", "scripts": { "build": "tsc --pretty", "dev": "tsc --watch --pretty", diff --git a/packages/setup-brew/jest.config.mjs b/packages/setup-brew/jest.config.mjs new file mode 100644 index 00000000..2f85d294 --- /dev/null +++ b/packages/setup-brew/jest.config.mjs @@ -0,0 +1,2 @@ +import jestConfig from "../../jest.config.mjs" +export default jestConfig diff --git a/packages/setup-brew/package.json b/packages/setup-brew/package.json index 8955ec3e..d1ff2778 100644 --- a/packages/setup-brew/package.json +++ b/packages/setup-brew/package.json @@ -8,12 +8,14 @@ "author": "Amin Yahyaabadi", "main": "./dist/index.js", "source": "./src/index.ts", + "type": "module", "scripts": { "build": "tsc --pretty", "dev": "tsc --watch --pretty", "lint.tsc": "tsc --noEmit --pretty", "lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix", - "prepublishOnly": "pnpm run build" + "prepublishOnly": "pnpm run build", + "test": "jest --coverage" }, "dependencies": { "@types/node": "^12", diff --git a/packages/untildify-user/package.json b/packages/untildify-user/package.json index 9e1aa667..81060162 100644 --- a/packages/untildify-user/package.json +++ b/packages/untildify-user/package.json @@ -8,6 +8,7 @@ "author": "Amin Yahyaabadi", "main": "./dist/index.js", "source": "./src/index.ts", + "type": "module", "scripts": { "build": "tsc --pretty", "dev": "tsc --watch --pretty", diff --git a/tsconfig.json b/tsconfig.json index ac4239b6..f11fc579 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -35,6 +35,7 @@ "include": [ "./src", "./dev/", - "./*.ts" + "./*.ts", + "jest.config.mjs" ] } diff --git a/turbo.json b/turbo.json index ba46b5c2..e7a4e897 100644 --- a/turbo.json +++ b/turbo.json @@ -18,6 +18,9 @@ }, "lint": { "dependsOn": ["lint.tsc", "lint.eslint"] + }, + "test": { + "dependsOn": ["build", "^test"] } }, "ui": "stream"