diff --git a/lib/Generate.js b/lib/Generate.js index f6cad66a..6d87e068 100644 --- a/lib/Generate.js +++ b/lib/Generate.js @@ -53,8 +53,10 @@ ${after} // variant of the `Test` type. To avoid having to update this regex if a new // variant is added, newer versions of elm-explorations/test have prefixed all // variants with `ElmTestVariant__` so we can match just on that. +// `\$?` is for the Lamdera compiler, where definitions sometimes end with a `$`. +// See https://github.com/lamdera/compiler/pull/41#issuecomment-2725158568 const testVariantDefinition = - /^var\s+\$elm_explorations\$test\$Test\$Internal\$(?:ElmTestVariant__\w+|UnitTest|FuzzTest|Labeled|Skipped|Only|Batch)\s*=\s*(?:\w+\(\s*)?function\s*\([\w, ]*\)\s*\{\s*return *\{/gm; + /^var\s+\$elm_explorations\$test\$Test\$Internal\$(?:ElmTestVariant__\w+|UnitTest|FuzzTest|Labeled|Skipped|Only|Batch)\$?\s*=\s*(?:\w+\(\s*)?function\s*\([\w, ]*\)\s*\{\s*return *\{/gm; const checkDefinition = /^(var\s+\$author\$project\$Test\$Runner\$Node\$check)\s*=\s*\$author\$project\$Test\$Runner\$Node\$checkHelperReplaceMe___;?$/m;