diff options
-rw-r--r-- | integration/snippets/template-literal.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/integration/snippets/template-literal.js b/integration/snippets/template-literal.js index b65f1a6b1..ff4e08a4d 100644 --- a/integration/snippets/template-literal.js +++ b/integration/snippets/template-literal.js @@ -24,6 +24,15 @@ const fooUTF16 = css` after `; + +const templateLiteralWhichDefinesAFunction = ((...args) => + args[args.length - 1]().toString())` + before + 🙃 ${() => true} + after + +`; + export function test() { for (let foo of [fooNoBracesUT16, fooNoBracesUTF8, fooUTF16, fooUTF8]) { console.assert( @@ -33,5 +42,10 @@ export function test() { console.assert(foo.includes("after"), `Expected ${foo} to include "after"`); } + console.assert( + templateLiteralWhichDefinesAFunction.includes("true"), + "Expected fooFunction to include 'true'" + ); + return testDone(import.meta.url); } |