Skip to content

Commit 9da51cf

Browse files
jcobisaddaleax
andauthored
Regex alternative
Co-authored-by: Anna Henningsen <[email protected]>
1 parent 4d64eff commit 9da51cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compass-collection/src/components/mock-data-generator-modal/script-generation-utils.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function testDocumentCodeExecution(script: string): any {
1919
// The "{ ... }" part is the document structure
2020

2121
// Extract the return statement from the generateDocument function
22-
const returnMatch = script.match(/return ([\s\S]*?);[\s]*\}/);
22+
const returnMatch = script.match(/return (.*?);\s*\}/s);
2323
expect(returnMatch, 'Should contain return statement').to.not.be.null;
2424

2525
// Get the document structure expression (everything between "return" and ";")

0 commit comments

Comments
 (0)