diff options
| author | Michael Williamson <mike@zwobble.org> | 2021-01-16 15:21:03 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2021-01-16 15:21:03 +0000 |
| commit | 5138195d335706a59ff19b60bb63ae28ca25b490 (patch) | |
| tree | 82bf82fe098599eada00b6dad7693a05fba1c332 /js/test | |
| parent | 3db30ec2e16a06a5f6dd387b51d61bd5a8a67c1e (diff) | |
Support finding dingbats by code point
Diffstat (limited to 'js/test')
| -rw-r--r-- | js/test/tests.ts | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/js/test/tests.ts b/js/test/tests.ts index e92eedc..a00b827 100644 --- a/js/test/tests.ts +++ b/js/test/tests.ts @@ -2,6 +2,22 @@ import assert from "assert"; import * as dingbatToUnicode from "../"; +export function canConvertFromDingbatCodePointToUnicode() { + const result = dingbatToUnicode.codePoint("Wingdings", 41); + + assert.deepStrictEqual(result, { + codePoint: 0x2706, + }); +} + +export function canConvertFromDecimalDingbatToUnicode() { + const result = dingbatToUnicode.dec("Wingdings", "41"); + + assert.deepStrictEqual(result, { + codePoint: 0x2706, + }); +} + export function canConvertFromHexDingbatToUnicode() { const result = dingbatToUnicode.hex("Wingdings", "29"); @@ -25,11 +41,3 @@ export function canConvertFromLowercaseHexDingbatToUnicode() { codePoint: 0x2707, }); } - -export function canConvertFromDecimalDingbatToUnicode() { - const result = dingbatToUnicode.dec("Wingdings", "41"); - - assert.deepStrictEqual(result, { - codePoint: 0x2706, - }); -} |
