From 9b0f622ffbb46e91fe04df85eb9a5b8154f48331 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 24 Oct 2014 09:44:45 -0700 Subject: [PATCH] :memo: Mention combined characters in spec description --- spec/text-utils-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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