diff --git a/test/spec/util/util.js b/test/spec/util/util.js index fe4116f6b..c67ab256c 100644 --- a/test/spec/util/util.js +++ b/test/spec/util/util.js @@ -217,7 +217,7 @@ describe('iD.util', function() { expect(iD.utilUnicodeCharsTruncated('๐Ÿ‡จ๐Ÿ‡ฆ', 1)).to.be.oneOf(['๐Ÿ‡จ', '\ud83c']); expect(iD.utilUnicodeCharsTruncated('๐Ÿณ๏ธโ€๐ŸŒˆ', 2)).to.be.oneOf(['๐Ÿณ๏ธ', '\ud83c\udff3']); expect(iD.utilUnicodeCharsTruncated('โ€๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง', 4)).to.be.oneOf(['โ€๐Ÿ‘ฉโ€๐Ÿ‘ฉ', 'โ€๐Ÿ‘ฉโ€']); - expect(iD.utilUnicodeCharsTruncated('๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘ฉ', 6)).to.be.oneOf(['๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹', '๐Ÿ’‹โ€๐Ÿ‘ฉ']); + expect(iD.utilUnicodeCharsTruncated('๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹โ€๐Ÿ‘ฉ', 6)).to.be.oneOf(['๐Ÿ‘ฉโ€โค๏ธโ€๐Ÿ’‹', '๐Ÿ‘ฉโ€โค๏ธโ€']); expect(iD.utilUnicodeCharsTruncated('๐Ÿ˜Ž๐Ÿ˜ฌ๐Ÿ˜†๐Ÿ˜ต๐Ÿ˜ด๐Ÿ˜„๐Ÿ™‚๐Ÿค”', 0)).to.eql(''); expect(iD.utilUnicodeCharsTruncated('๐Ÿ˜Ž๐Ÿ˜ฌ๐Ÿ˜†๐Ÿ˜ต๐Ÿ˜ด๐Ÿ˜„๐Ÿ™‚๐Ÿค”', 4)).to.be.oneOf(['๐Ÿ˜Ž๐Ÿ˜ฌ๐Ÿ˜†๐Ÿ˜ต', '๐Ÿ˜Ž๐Ÿ˜ฌ']); expect(iD.utilUnicodeCharsTruncated('๐Ÿ˜Ž๐Ÿ˜ฌ๐Ÿ˜†๐Ÿ˜ต๐Ÿ˜ด๐Ÿ˜„๐Ÿ™‚๐Ÿค”', 8)).to.be.oneOf(['๐Ÿ˜Ž๐Ÿ˜ฌ๐Ÿ˜†๐Ÿ˜ต๐Ÿ˜ด๐Ÿ˜„๐Ÿ™‚๐Ÿค”', '๐Ÿ˜Ž๐Ÿ˜ฌ๐Ÿ˜†๐Ÿ˜ต']);