Skip to content

Commit

Permalink
Add test for getHangulCharName function
Browse files Browse the repository at this point in the history
  • Loading branch information
mooniker committed Oct 13, 2019
1 parent d92ef13 commit 17478d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hangul/unicode/characterNameGeneration.js
Expand Up @@ -9,7 +9,7 @@ const {
JAMO_L_TABLE,
JAMO_V_TABLE,
JAMO_T_TABLE
} = require("./shortNames");
} = require("./jamoShortNames");

/**
* Generates a letter/jamo-derived short name for a given precomposed Hangul syllable
Expand Down
9 changes: 8 additions & 1 deletion hangul/unicode/characterNameGeneration.test.js
@@ -1,5 +1,4 @@
const { getHangulCharName } = require("./characterNameGeneration");
const lo = require("unicode/category/Lo");

const hangulCharNames = {
: "ga",
Expand All @@ -17,3 +16,11 @@ describe("getHangulCharName function", () => {
});
});
});

describe("getHangulCharName function", () => {
test(`should generate 'PWILH' for ${String.fromCodePoint(0xd4db)}`, () => {
expect(getHangulCharName(String.fromCodePoint(0xd4db))).toBe(
"HANGUL SYLLABLE PWILH"
);
});
});
File renamed without changes.

0 comments on commit 17478d4

Please sign in to comment.