File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1+ const aliasMapper = {
2+ logger : "<rootDir>/js/logger.js"
3+ } ;
4+
15const config = {
26 verbose : true ,
37 testTimeout : 20000 ,
@@ -6,21 +10,21 @@ const config = {
610 {
711 displayName : "unit" ,
812 globalSetup : "<rootDir>/tests/unit/helpers/global-setup.js" ,
9- moduleNameMapper : {
10- logger : "<rootDir>/js/logger.js"
11- } ,
13+ moduleNameMapper : aliasMapper ,
1214 testMatch : [ "**/tests/unit/**/*.[jt]s?(x)" ] ,
1315 testPathIgnorePatterns : [ "<rootDir>/tests/unit/mocks" , "<rootDir>/tests/unit/helpers" ]
1416 } ,
1517 {
1618 displayName : "electron" ,
1719 testMatch : [ "**/tests/electron/**/*.[jt]s?(x)" ] ,
20+ moduleNameMapper : aliasMapper ,
1821 testPathIgnorePatterns : [ "<rootDir>/tests/electron/helpers" ]
1922 } ,
2023 {
2124 displayName : "e2e" ,
2225 testMatch : [ "**/tests/e2e/**/*.[jt]s?(x)" ] ,
2326 modulePaths : [ "<rootDir>/js/" ] ,
27+ moduleNameMapper : aliasMapper ,
2428 testPathIgnorePatterns : [ "<rootDir>/tests/e2e/helpers" , "<rootDir>/tests/e2e/mocks" ]
2529 }
2630 ] ,
Original file line number Diff line number Diff line change 1+ // Ensure internal require aliases (e.g., "logger") resolve when this file is run as a standalone script
2+ require ( "./alias-resolver" ) ;
3+
14const path = require ( "node:path" ) ;
25const fs = require ( "node:fs" ) ;
36const { styleText } = require ( "node:util" ) ;
47const Ajv = require ( "ajv" ) ;
58const globals = require ( "globals" ) ;
69const { Linter } = require ( "eslint" ) ;
10+ const Log = require ( "logger" ) ;
711
812const rootPath = path . resolve ( `${ __dirname } /../` ) ;
9- const Log = require ( `${ rootPath } /js/logger.js` ) ;
1013const Utils = require ( `${ rootPath } /js/utils.js` ) ;
1114
1215const linter = new Linter ( { configType : "flat" } ) ;
You can’t perform that action at this time.
0 commit comments