Skip to content

Commit

Permalink
Use ts-check instead of relying on ts-node, fix absolute path resolut…
Browse files Browse the repository at this point in the history
…ion in tests
  • Loading branch information
luxaritas committed Aug 12, 2022
1 parent 7317f7e commit 3457641
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/jest-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "Eterna standard Jest setup and utilities",
"version": "1.1.0",
"license": "BSD-3-Clause",
"type": "module",
"scripts": {
"prepublishOnly": "nx build",
"build": "vite build",
Expand Down
1 change: 1 addition & 0 deletions packages/jest-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function getConfig(mode: 'typescript' | 'vue') {
'!**/*.(spec|test).(js|mjs|cjs|ts|mts|cts)',
'!**/(__tests__|test|tests|spec)/**/*.(js|mjs|cjs|ts|mts|cts)',
],
modulePaths: ['<rootDir>/src/'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.spec.json',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
import { getConfig } from '@eternagame/jest-utils';

export default getConfig('typescript');
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"references": [
{"path": "./tsconfig.build.json"}
],
"compilerOptions": {
"baseUrl": "src"
},
"include": [
"**/*.spec.ts",
"**/*.test.ts",
Expand Down
2 changes: 0 additions & 2 deletions packages/nx-plugin/src/generators/ts-iso/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ function updatePackageJson(tree: Tree, options: NormalizedSchema) {
'@types/jest',
'ts-jest',
'typescript',
// For loading TS jest config files
'ts-node',
]),
);
}
Expand Down
1 change: 0 additions & 1 deletion packages/nx-plugin/src/utils/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const VERSIONS = {
jest: '^27.5.0',
'@types/jest': '^27.4.0',
'ts-jest': '^27.1.3',
'ts-node': '^10.9.1',
} as const;

export default function getDependencyVersions(
Expand Down

0 comments on commit 3457641

Please sign in to comment.