Open p-bakker opened 3 years ago
Test could be something like
(function(str) {return str[0]})`\u{1F680}` === '🚀'
Happy to create a PR, just not sure exactly where to put this test, in a new file or in one of the existing files in /language/expressions/template-literal
Wow, Rhino! Thanks for going the extra mile and letting us know about the missing coverage. If you have the bandwidth, it would be great to get your contribution. If not, I'll gladly write a patch based on your report.
test/language/expressions/template-literal/tv-utf16-escape-sequence.js
seems like a logical place for the assertion. I'd also support placing it in a dedicated file--you can only fail a test once, after all.
Code implementing Bullet 3 - 5 of https://tc39.es/ecma262/#sec-utf16encodecodepoint isn't hit when when a
\u{...}
unicode escape sequence in the range of 0x10000 through 0x10FFFF is used in a Template LiteralNone of the existing tests for (Tagged) Template Literals include a Template Literal with a unicode escape sequence in that range