mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 15:56:40 +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
14 lines
385 B
JavaScript
14 lines
385 B
JavaScript
module.exports = {
|
|
bail: true, // Exit test script on first error
|
|
exit: true, // Force Mocha to exit after tests complete
|
|
recursive: true, // Look for tests in subdirectories
|
|
require: [
|
|
// Files to execute before running suites
|
|
'ts-node/register/transpile-only',
|
|
'tsconfig-paths/register',
|
|
'test/config/fixtures.ts',
|
|
],
|
|
spec: ['test/**/*.spec.ts'],
|
|
timeout: '30000',
|
|
};
|