diff --git a/spec/text-utils-spec.coffee b/spec/text-utils-spec.coffee index 3c234c5e5..6a03bb02f 100644 --- a/spec/text-utils-spec.coffee +++ b/spec/text-utils-spec.coffee @@ -2,7 +2,7 @@ textUtils = require '../src/text-utils' describe 'text utilities', -> describe '.hasPairedCharacter(string)', -> - it 'returns true when the string contains a surrogate pair or variation sequence', -> + it 'returns true when the string contains a surrogate pair, variation sequence, or combined character', -> expect(textUtils.hasPairedCharacter('abc')).toBe false expect(textUtils.hasPairedCharacter('a\uD835\uDF97b\uD835\uDF97c')).toBe true expect(textUtils.hasPairedCharacter('\uD835\uDF97')).toBe true @@ -18,7 +18,7 @@ describe 'text utilities', -> expect(textUtils.hasPairedCharacter('\u0301\u0301')).toBe false describe '.isPairedCharacter(string, index)', -> - it 'returns true when the index is the start of a high/low surrogate pair or variation sequence', -> + it 'returns true when the index is the start of a high/low surrogate pair, variation sequence, or combined character', -> expect(textUtils.isPairedCharacter('a\uD835\uDF97b\uD835\uDF97c', 0)).toBe false expect(textUtils.isPairedCharacter('a\uD835\uDF97b\uD835\uDF97c', 1)).toBe true expect(textUtils.isPairedCharacter('a\uD835\uDF97b\uD835\uDF97c', 2)).toBe false