Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8aa830

Browse files
committed
Add specific test about escaped quotes
1 parent 432eb71 commit b8aa830

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Component/AssetMapper/Tests/Compiler/JavaScriptImportPathCompilerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,15 @@ public static function provideCompileTests(): iterable
279279
'expectedJavaScriptImports' => [],
280280
];
281281

282+
yield 'import_in_double_quoted_string_with_escaped_quote_is_ignored' => [
283+
'input' => <<<EOF
284+
const fun;
285+
console.log(" foo \" import('./foo.js')");
286+
EOF
287+
,
288+
'expectedJavaScriptImports' => [],
289+
];
290+
282291
yield 'import_in_single_quoted_string_is_ignored' => [
283292
'input' => <<<EOF
284293
const fun;

0 commit comments

Comments
 (0)