diff --git a/jest.config.js b/jest.config.js index ef552ba..159ae6b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,8 @@ +/** @type {import('jest').Config} */ const config = { - testEnvironment: 'node', collectCoverage: true, + injectGlobals: false, + testEnvironment: 'node', transform: { '^.+\\.tsx?$': ['ts-jest'], }, diff --git a/package-lock.json b/package-lock.json index ec0efd7..fb07c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "12.1.0", "license": "MIT", "devDependencies": { - "@types/jest": "^29.2.6", + "@jest/globals": "^29.3.1", "@types/node": "^20.11.7", "commander": "~12.1.0", "eslint": "^8.57.0", @@ -1323,16 +1323,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", - "dev": true, - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", diff --git a/package.json b/package.json index 1763e3a..d0d2e3b 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "commander": "~12.1.0" }, "devDependencies": { - "@types/jest": "^29.2.6", + "@jest/globals": "^29.3.1", "@types/node": "^20.11.7", "commander": "~12.1.0", "eslint": "^8.57.0", diff --git a/tests/global-createArgument.test.ts b/tests/global-createArgument.test.ts index 3283219..96864e9 100644 --- a/tests/global-createArgument.test.ts +++ b/tests/global-createArgument.test.ts @@ -1,3 +1,4 @@ +import { expect, test } from '@jest/globals'; import { createArgument } from '..'; test('when createArgument without description then argument has name', () => { diff --git a/tests/global-createCommand.test.ts b/tests/global-createCommand.test.ts index 625a442..8535dbb 100644 --- a/tests/global-createCommand.test.ts +++ b/tests/global-createCommand.test.ts @@ -1,3 +1,4 @@ +import { expect, test } from '@jest/globals'; import { createCommand } from '..'; test('when createCommand without name then command has empty name', () => { diff --git a/tests/global-createOption.test.ts b/tests/global-createOption.test.ts index d1fdbf9..6200740 100644 --- a/tests/global-createOption.test.ts +++ b/tests/global-createOption.test.ts @@ -1,3 +1,4 @@ +import { expect, test } from '@jest/globals'; import { createOption } from '..'; test('when createOption without description then option has flags', () => { diff --git a/tsconfig.json b/tsconfig.json index 3bda6f3..39dd1fc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": ["es6"], - "types": ["node", "jest"], + "types": ["node"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true,