diff --git a/cli/asdf b/cli/asdf deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/cli/jest.config.ts b/cli/jest.config.ts deleted file mode 100644 index ea9b76d94d..0000000000 --- a/cli/jest.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Config } from 'jest'; - -const config: Config = { - preset: 'ts-jest', - setupFilesAfterEnv: ['jest-extended/all'], -}; - -export default config; diff --git a/cli/package.json b/cli/package.json index cb07e71b02..546fd02068 100644 --- a/cli/package.json +++ b/cli/package.json @@ -40,10 +40,29 @@ "yaml": "^2.3.1" }, "scripts": { + "build": "tsc --project tsconfig.build.json", "lint": "eslint \"src/**/*.ts\" --max-warnings 0", "prepack": "yarn build ", "test": "jest", "test:cov": "jest --coverage", "format": "prettier --check ." + }, + "jest": { + "clearMocks": true, + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], + "rootDir": ".", + "testRegex": ".*\\.spec\\.ts$", + "transform": { + "^.+\\.ts$": "ts-jest" + }, + "collectCoverageFrom": [ + "/src/**/*.(t|j)s" + ], + "coverageDirectory": "./coverage", + "testEnvironment": "node" } } diff --git a/cli/test/tsconfig.json b/cli/test/tsconfig.json deleted file mode 100644 index 460cf368f7..0000000000 --- a/cli/test/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../tsconfig", - "compilerOptions": { - "noEmit": true - }, - "references": [{ "path": ".." }] -} diff --git a/cli/tsconfig.build.json b/cli/tsconfig.build.json new file mode 100644 index 0000000000..0d7cd0873c --- /dev/null +++ b/cli/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["dist", "node_modules", "upload", "test", "**/*spec.ts"] +}