-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the layout look more like the TSOFA lib
* note that the output goes into the dist directory * also special tsconfig just for jest
- Loading branch information
Showing
9 changed files
with
48 additions
and
6,978 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/node_modules/ | ||
/.idea/ | ||
/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import type {Config} from 'jest'; | ||
import { createDefaultEsmPreset, type JestConfigWithTsJest } from 'ts-jest' | ||
|
||
const config: Config = { | ||
clearMocks: true, | ||
testEnvironment: "node", | ||
preset: "ts-jest/presets/default-esm", | ||
const defaultEsmPreset = createDefaultEsmPreset( | ||
|
||
) | ||
|
||
const jestConfig: JestConfigWithTsJest = { | ||
// [...] | ||
...defaultEsmPreset, | ||
transform: { | ||
"^.+.(t|j)sx?$": ["ts-jest",{"useESM": true}], | ||
"^.+.(t|j)sx?$": ["ts-jest",{ | ||
useESM: true, | ||
tsconfig: "./tsconfig-jest.json" | ||
}], | ||
}, | ||
moduleNameMapper: { | ||
'^(\\.{1,2}/.*)\\.js$': '$1', | ||
}, | ||
}; | ||
export default config; | ||
} | ||
} | ||
|
||
export default jestConfig |
Oops, something went wrong.