diff --git a/jest.config.js b/jest.config.js index a9ce717b..42d3ca5a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,6 +2,10 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', forceExit:true, + transform: { + "^.+\\.(t|j)sx?$": "ts-jest", + "^.+\\.(ts|tsx|js|jsx)$": "babel-jest" + }, reporters: [ "default", ["jest-html-reporters", diff --git a/package-lock.json b/package-lock.json index 7de4e109..42e14f07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4433,20 +4433,12 @@ "dev": true }, "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", "dev": true, "requires": { - "ci-info": "^2.0.0" - }, - "dependencies": { - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - } + "ci-info": "^3.1.1" } }, "is-core-module": { @@ -8224,15 +8216,15 @@ "dev": true }, "ts-jest": { - "version": "26.5.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", - "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", + "version": "27.0.0-next.12", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.0.0-next.12.tgz", + "integrity": "sha512-Bde6QLSS8s2riYk8Aw/fpLdcSpH4dFSpY+JeRk8LQ/kvEZoSs5Gx4C8VqnugHO8CnlkOwvoSbI0PsAs8V85o3A==", "dev": true, "requires": { "bs-logger": "0.x", "buffer-from": "1.x", "fast-json-stable-stringify": "2.x", - "jest-util": "^26.1.0", + "jest-util": "27.0.0-next.9", "json5": "2.x", "lodash": "4.x", "make-error": "1.x", @@ -8241,18 +8233,40 @@ "yargs-parser": "20.x" }, "dependencies": { + "@jest/types": { + "version": "27.2.5", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.2.5.tgz", + "integrity": "sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "version": "27.0.0-next.9", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.0.0-next.9.tgz", + "integrity": "sha512-q9/hnWgFIx4Wkd/RoxoOeODL1kvwlX8+uo5fdi5oxEi7CrJIUDXS/QqICWo0GoqW4HlEgATdLmjG1gZXXDSyww==", "dev": true, "requires": { - "@jest/types": "^26.6.2", + "@jest/types": "^27.0.0-next.8", "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" + "is-ci": "^3.0.0", + "picomatch": "^2.2.3" } }, "json5": { diff --git a/package.json b/package.json index 2c12007e..92d54aa2 100755 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts": { "test": "npm run test:e2e && npm run test:typescript", "test:e2e": "istanbul cover tape test/index.js | tap-html --out ./tap-html.html", - "test:typescript": "jest --testPathPattern=test/typescript", + "test:typescript": "jest --config jest.config.js --testPathPattern=test/typescript", "automate": "node test.js", "build:node": "webpack --config webpack/webpack.node.js", "build:web": "webpack --config webpack/webpack.web.js", @@ -90,7 +90,7 @@ "tap-html": "^1.0.1", "tap-json": "1.0.0", "tape": "4.8.0", - "ts-jest": "^26.5.6", + "ts-jest": "^27.0.0-next.12", "typescript": "^4.4.3", "uglify-js": "2.8.29", "webpack": "^5.59.0", diff --git a/tsconfig.json b/tsconfig.json index 8c284790..950bc077 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "strictNullChecks": true, "types": ["jest"], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "allowJs": true }, "files": ["index.d.ts"] }