Skip to content

Commit

Permalink
don't hardcode svelte version
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jul 24, 2023
1 parent 875f27f commit b507dbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const processAsync = async (source, filename, jestOptions) => {
*/
const processSync = (source, filename, jestOptions) => {
const options = jestOptions && jestOptions.transformerConfig ? jestOptions.transformerConfig : {}
const { preprocess, rootMode, maxBuffer, showConsoleLog, debug, svelteVersion = '4' } = options
const { preprocess, rootMode, maxBuffer, showConsoleLog, debug, svelteVersion } = options

if (!isSvelte3(svelteVersion)) {
throw new Error('Jest is being called in CJS mode. You must use ESM mode in Svelte 4+')
Expand Down

0 comments on commit b507dbf

Please sign in to comment.