Closed robert-cronin closed 3 years ago
This applies to EncryptedFS aswell. We should alter the jest configuration to setup module name mapper.
const { pathsToModuleNameMapper } = require('ts-jest/utils'); const { compilerOptions } = require('./tsconfig'); module.exports = { "roots": [ "<rootDir>/tests" ], "testMatch": [ "**/?(*.)+(spec|test|unit.test).+(ts|tsx|js)" ], "transform": { "^.+\\.tsx?$": "ts-jest" }, globalSetup : "<rootDir>/tests/setup.ts", globalTeardown: "<rootDir>/tests/teardown.ts", moduleNameMapper: pathsToModuleNameMapper( compilerOptions.paths, { prefix: "<rootDir>/src/" } ) };
The global set up and teardown might be useful for polykey to set the daemons running or other stateful setup. Tests that aren't unit tests should also be renamed from ...unit.test.ts to ...test.ts
...unit.test.ts
...test.ts
Closing on account of migration to gitlab
This applies to EncryptedFS aswell. We should alter the jest configuration to setup module name mapper.
The global set up and teardown might be useful for polykey to set the daemons running or other stateful setup. Tests that aren't unit tests should also be renamed from
...unit.test.ts
to...test.ts