-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(presets): maintain preset codes inside
src
- Loading branch information
Showing
3 changed files
with
59 additions
and
68 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,17 +1,3 @@ | ||
import type { TsJestPresets } from '../dist' | ||
import allPresets from '../dist/presets/all-presets' | ||
|
||
declare const _default: { | ||
defaults: TsJestPresets; | ||
defaultsLegacy: TsJestPresets; | ||
defaultsESM: TsJestPresets; | ||
defaultsESMLegacy: TsJestPresets; | ||
jsWithTs: TsJestPresets; | ||
jsWithTsLegacy: TsJestPresets; | ||
jsWithTsESM: TsJestPresets; | ||
jsWithTsESMLegacy: TsJestPresets; | ||
jsWithBabel: TsJestPresets; | ||
jsWithBabelLegacy: TsJestPresets; | ||
jsWithBabelESM: TsJestPresets; | ||
jsWithBabelESMLegacy: TsJestPresets; | ||
}; | ||
export = _default; | ||
export = allPresets |
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,53 +1,3 @@ | ||
const { | ||
createDefaultPreset, | ||
createDefaultEsmPreset, | ||
createJsWithTsPreset, | ||
createJsWithTsEsmPreset, | ||
createJsWithBabelPreset, | ||
createJsWithBabelEsmPreset, | ||
createDefaultLegacyPreset, | ||
createDefaultEsmLegacyPreset, | ||
createJsWithTsLegacyPreset, | ||
createJsWithTsEsmLegacyPreset, | ||
createJsWithBabelLegacyPreset, | ||
createJsWithBabelEsmLegacyPreset, | ||
} = require('../dist/presets/create-jest-preset') | ||
const allPresets = require('../dist/presets/all-presets') | ||
|
||
module.exports = { | ||
get defaults() { | ||
return createDefaultPreset() | ||
}, | ||
get defaultsLegacy() { | ||
return createDefaultLegacyPreset() | ||
}, | ||
get defaultsESM() { | ||
return createDefaultEsmPreset() | ||
}, | ||
get defaultsESMLegacy() { | ||
return createDefaultEsmLegacyPreset() | ||
}, | ||
get jsWithTs() { | ||
return createJsWithTsPreset() | ||
}, | ||
get jsWithTsLegacy() { | ||
return createJsWithTsLegacyPreset() | ||
}, | ||
get jsWithTsESM() { | ||
return createJsWithTsEsmPreset() | ||
}, | ||
get jsWithTsESMLegacy() { | ||
return createJsWithTsEsmLegacyPreset() | ||
}, | ||
get jsWithBabel() { | ||
return createJsWithBabelPreset() | ||
}, | ||
get jsWithBabelLegacy() { | ||
return createJsWithBabelLegacyPreset() | ||
}, | ||
get jsWithBabelESM() { | ||
return createJsWithBabelEsmPreset() | ||
}, | ||
get jsWithBabelESMLegacy() { | ||
return createJsWithBabelEsmLegacyPreset() | ||
}, | ||
} | ||
module.exports = allPresets.default |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { | ||
createDefaultEsmLegacyPreset, | ||
createDefaultEsmPreset, | ||
createDefaultLegacyPreset, | ||
createDefaultPreset, | ||
createJsWithBabelEsmLegacyPreset, | ||
createJsWithBabelEsmPreset, | ||
createJsWithBabelLegacyPreset, | ||
createJsWithBabelPreset, | ||
createJsWithTsEsmLegacyPreset, | ||
createJsWithTsEsmPreset, | ||
createJsWithTsLegacyPreset, | ||
createJsWithTsPreset, | ||
} from './create-jest-preset' | ||
|
||
const allPresets = { | ||
get defaults() { | ||
return createDefaultPreset() | ||
}, | ||
get defaultsLegacy() { | ||
return createDefaultLegacyPreset() | ||
}, | ||
get defaultsESM() { | ||
return createDefaultEsmPreset() | ||
}, | ||
get defaultsESMLegacy() { | ||
return createDefaultEsmLegacyPreset() | ||
}, | ||
get jsWithTs() { | ||
return createJsWithTsPreset() | ||
}, | ||
get jsWithTsLegacy() { | ||
return createJsWithTsLegacyPreset() | ||
}, | ||
get jsWithTsESM() { | ||
return createJsWithTsEsmPreset() | ||
}, | ||
get jsWithTsESMLegacy() { | ||
return createJsWithTsEsmLegacyPreset() | ||
}, | ||
get jsWithBabel() { | ||
return createJsWithBabelPreset() | ||
}, | ||
get jsWithBabelLegacy() { | ||
return createJsWithBabelLegacyPreset() | ||
}, | ||
get jsWithBabelESM() { | ||
return createJsWithBabelEsmPreset() | ||
}, | ||
get jsWithBabelESMLegacy() { | ||
return createJsWithBabelEsmLegacyPreset() | ||
}, | ||
} | ||
|
||
export default allPresets |