From e9c3e401275eaecbecdd1e1287f2af61c796a4ab Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Thu, 14 Nov 2019 13:44:47 +0300 Subject: [PATCH] test: fix jest configurations --- npm/ng-packs/packages/account-config/jest.config.js | 1 - npm/ng-packs/packages/account/jest.config.js | 1 - npm/ng-packs/packages/core/jest.config.js | 4 ---- npm/ng-packs/packages/core/tsconfig.spec.json | 5 +---- npm/ng-packs/packages/feature-management/jest.config.js | 1 - npm/ng-packs/packages/identity-config/jest.config.js | 3 +-- npm/ng-packs/packages/identity/jest.config.js | 1 - npm/ng-packs/packages/permission-management/jest.config.js | 1 - .../packages/setting-management-config/jest.config.js | 3 +-- npm/ng-packs/packages/setting-management/jest.config.js | 3 +-- .../packages/tenant-management-config/jest.config.js | 1 - npm/ng-packs/packages/tenant-management/jest.config.js | 1 - npm/ng-packs/packages/theme-basic/jest.config.js | 1 - npm/ng-packs/packages/theme-shared/jest.config.js | 4 ---- npm/ng-packs/packages/theme-shared/tsconfig.spec.json | 5 +---- 15 files changed, 5 insertions(+), 30 deletions(-) diff --git a/npm/ng-packs/packages/account-config/jest.config.js b/npm/ng-packs/packages/account-config/jest.config.js index a52fa2f369..97cd0af1aa 100644 --- a/npm/ng-packs/packages/account-config/jest.config.js +++ b/npm/ng-packs/packages/account-config/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'account-config', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/account/jest.config.js b/npm/ng-packs/packages/account/jest.config.js index 5392bab38e..c9c02c909f 100644 --- a/npm/ng-packs/packages/account/jest.config.js +++ b/npm/ng-packs/packages/account/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'account', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/core/jest.config.js b/npm/ng-packs/packages/core/jest.config.js index 2e294cf4e6..9886cf4d3d 100644 --- a/npm/ng-packs/packages/core/jest.config.js +++ b/npm/ng-packs/packages/core/jest.config.js @@ -1,10 +1,6 @@ -const { pathsToModuleNameMapper } = require('ts-jest/utils'); -const { compilerOptions } = require('./tsconfig.spec'); const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'core', - moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths /*, { prefix: '/' } */), - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/core/tsconfig.spec.json b/npm/ng-packs/packages/core/tsconfig.spec.json index d2fb1e6cb3..54e55c4f05 100644 --- a/npm/ng-packs/packages/core/tsconfig.spec.json +++ b/npm/ng-packs/packages/core/tsconfig.spec.json @@ -5,10 +5,7 @@ "esModuleInterop": true, "outDir": "../../dist/out-tsc", "module": "commonjs", - "types": ["jest", "node"], - "paths": { - "@abp/ng.core/*": ["packages/core/src/lib/*"] - } + "types": ["jest", "node"] }, "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/npm/ng-packs/packages/feature-management/jest.config.js b/npm/ng-packs/packages/feature-management/jest.config.js index febb971892..327a1a8391 100644 --- a/npm/ng-packs/packages/feature-management/jest.config.js +++ b/npm/ng-packs/packages/feature-management/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'feature-management', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/identity-config/jest.config.js b/npm/ng-packs/packages/identity-config/jest.config.js index 16fc34a4e6..27701730cb 100644 --- a/npm/ng-packs/packages/identity-config/jest.config.js +++ b/npm/ng-packs/packages/identity-config/jest.config.js @@ -2,6 +2,5 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, - name: 'setting-management-config', - 'ts-jest': { allowSyntheticDefaultImports: true }, + name: 'identity-config', }; diff --git a/npm/ng-packs/packages/identity/jest.config.js b/npm/ng-packs/packages/identity/jest.config.js index 272aeb04c5..3ab73ba573 100644 --- a/npm/ng-packs/packages/identity/jest.config.js +++ b/npm/ng-packs/packages/identity/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'identity', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/permission-management/jest.config.js b/npm/ng-packs/packages/permission-management/jest.config.js index 89d7bd65f1..65d91da345 100644 --- a/npm/ng-packs/packages/permission-management/jest.config.js +++ b/npm/ng-packs/packages/permission-management/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'permission-management', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/setting-management-config/jest.config.js b/npm/ng-packs/packages/setting-management-config/jest.config.js index 56d7a72808..77ce8a5dfa 100644 --- a/npm/ng-packs/packages/setting-management-config/jest.config.js +++ b/npm/ng-packs/packages/setting-management-config/jest.config.js @@ -2,6 +2,5 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, - name: 'identity-config', - 'ts-jest': { allowSyntheticDefaultImports: true }, + name: 'setting-management-config', }; diff --git a/npm/ng-packs/packages/setting-management/jest.config.js b/npm/ng-packs/packages/setting-management/jest.config.js index 56d7a72808..0764d1de72 100644 --- a/npm/ng-packs/packages/setting-management/jest.config.js +++ b/npm/ng-packs/packages/setting-management/jest.config.js @@ -2,6 +2,5 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, - name: 'identity-config', - 'ts-jest': { allowSyntheticDefaultImports: true }, + name: 'setting-management', }; diff --git a/npm/ng-packs/packages/tenant-management-config/jest.config.js b/npm/ng-packs/packages/tenant-management-config/jest.config.js index affd49e0d7..e146e10d0a 100644 --- a/npm/ng-packs/packages/tenant-management-config/jest.config.js +++ b/npm/ng-packs/packages/tenant-management-config/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'tenant-management-config', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/tenant-management/jest.config.js b/npm/ng-packs/packages/tenant-management/jest.config.js index 5daf04ea93..778aa184cc 100644 --- a/npm/ng-packs/packages/tenant-management/jest.config.js +++ b/npm/ng-packs/packages/tenant-management/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'tenant-management', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/theme-basic/jest.config.js b/npm/ng-packs/packages/theme-basic/jest.config.js index ffb4ca0be6..ec38d9765d 100644 --- a/npm/ng-packs/packages/theme-basic/jest.config.js +++ b/npm/ng-packs/packages/theme-basic/jest.config.js @@ -3,5 +3,4 @@ const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'theme-basic', - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/theme-shared/jest.config.js b/npm/ng-packs/packages/theme-shared/jest.config.js index 718fcfe21b..c464ec4cbe 100644 --- a/npm/ng-packs/packages/theme-shared/jest.config.js +++ b/npm/ng-packs/packages/theme-shared/jest.config.js @@ -1,10 +1,6 @@ -const { pathsToModuleNameMapper } = require('ts-jest/utils'); -const { compilerOptions } = require('./tsconfig.spec'); const jestConfig = require('../../jest.config'); module.exports = { ...jestConfig, name: 'theme-shared', - moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths /*, { prefix: '/' } */), - 'ts-jest': { allowSyntheticDefaultImports: true }, }; diff --git a/npm/ng-packs/packages/theme-shared/tsconfig.spec.json b/npm/ng-packs/packages/theme-shared/tsconfig.spec.json index f87ea306f2..54e55c4f05 100644 --- a/npm/ng-packs/packages/theme-shared/tsconfig.spec.json +++ b/npm/ng-packs/packages/theme-shared/tsconfig.spec.json @@ -5,10 +5,7 @@ "esModuleInterop": true, "outDir": "../../dist/out-tsc", "module": "commonjs", - "types": ["jest", "node"], - "paths": { - "@abp/ng.theme-shared/*": ["packages/theme-shared/src/lib/*"] - } + "types": ["jest", "node"] }, "include": ["**/*.spec.ts", "**/*.d.ts"] }