mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
71eaa3327e
Currently, tests only can import source code modules through relative paths `../../`. This makes it very difficult to refactor and organize tests in folders as the paths change. [tsconfig-paths](https://www.npmjs.com/package/tsconfig-paths) allows to reference the source through an alias defined in the "paths" section of tsconfig.json
25 lines
561 B
JSON
25 lines
561 B
JSON
{
|
|
"compilerOptions": {
|
|
"baseUrl": "./",
|
|
"target": "ES2019",
|
|
"module": "commonjs",
|
|
"strict": true,
|
|
"strictFunctionTypes": false,
|
|
"strictPropertyInitialization": false,
|
|
"preserveConstEnums": true,
|
|
"inlineSourceMap": true,
|
|
"outDir": "./build/",
|
|
"skipLibCheck": true,
|
|
"lib": ["es2019"],
|
|
"resolveJsonModule": true,
|
|
"allowJs": true,
|
|
"paths": {
|
|
"~/src/*": ["src/*"],
|
|
"~/lib/*": ["src/lib/*"],
|
|
"~/test-lib/*": ["test/lib/*"],
|
|
"~/test-data/*": ["test/data/*"]
|
|
}
|
|
},
|
|
"include": ["src/**/*", "test/**/*", "typings/**/*.d.ts"]
|
|
}
|