mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-16 07:30:32 +00:00
test: use esm in jest
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
a4205e6fb8
commit
f6ab9025d0
1 changed files with 15 additions and 2 deletions
|
|
@ -1,11 +1,24 @@
|
|||
module.exports = {
|
||||
import type {Config} from 'jest';
|
||||
|
||||
const config: Config = {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ['js', 'ts'],
|
||||
setupFiles: ['dotenv/config', '<rootDir>/src/test_setup.ts'],
|
||||
testMatch: ['**/*.test.ts'],
|
||||
testTimeout: 30000,
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest'
|
||||
'^.+\\.ts$': [
|
||||
'ts-jest',
|
||||
{
|
||||
useESM: true
|
||||
}
|
||||
]
|
||||
},
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||
},
|
||||
verbose: true
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue