From 8e903f9a75bfe9a24e98c968c9bf7cbada089fd8 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Mon, 28 Apr 2025 19:35:07 +0200 Subject: [PATCH] remove not longer needed lines in jest.config.js, add type folder in root --- dht-node/jest.config.js | 20 -------------------- dht-node/tsconfig.json | 7 +++++-- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/dht-node/jest.config.js b/dht-node/jest.config.js index 66c5fba14..b0842b949 100644 --- a/dht-node/jest.config.js +++ b/dht-node/jest.config.js @@ -16,25 +16,5 @@ module.exports = { moduleNameMapper: { '@/(.*)': '/src/$1', '@test/(.*)': '/test/$1', - '@entity/(.*)': - // eslint-disable-next-line n/no-process-env - process.env.NODE_ENV === 'development' - ? '/../database/entity/$1' - : '/../database/build/entity/$1', - '@logging/(.*)': - // eslint-disable-next-line n/no-process-env - process.env.NODE_ENV === 'development' - ? '/../database/logging/$1' - : '/../database/build/logging/$1', - '@dbTools/(.*)': - // eslint-disable-next-line n/no-process-env - process.env.NODE_ENV === 'development' - ? '/../database/src/$1' - : '/../database/build/src/$1', - '@config/(.*)': - // eslint-disable-next-line n/no-process-env - process.env.NODE_ENV === 'development' - ? '/../config/src/$1' - : '/../config/build/$1', }, } diff --git a/dht-node/tsconfig.json b/dht-node/tsconfig.json index f2db3de23..f75601cf5 100644 --- a/dht-node/tsconfig.json +++ b/dht-node/tsconfig.json @@ -51,8 +51,11 @@ "@test/*": ["test/*"], }, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - "typeRoots": ["src/dht_node/@types", "node_modules/@types"], /* List of folders to include type definitions from. */ - "types": ["jest"], /* Type declaration files to be included in compilation. */ + "typeRoots": [ + "src/dht_node/@types", + "node_modules/@types", + "../node_modules/@types" + ], /* List of folders to include type definitions from. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */