Relatives import are quite ugly and reduces readability, but hard to say that Typescript handles it very well for compilation time, but nothing for runtime. That's why I had to add tsc-alias to the build script. Please see this issue for more details. https://github.com/Microsoft/TypeScript/issues/15479 Furthermore, some configuration was needed for Jest to work well.
10 lines
226 B
TypeScript
10 lines
226 B
TypeScript
import type { JestConfigWithTsJest } from "ts-jest";
|
|
|
|
const jestConfig: JestConfigWithTsJest = {
|
|
preset: "ts-jest",
|
|
testEnvironment: "node",
|
|
moduleDirectories: ["node_modules", "src/bin"],
|
|
};
|
|
|
|
export default jestConfig;
|