Skip to content

Commit

Permalink
added unit test for emoji parsing, closes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonmp committed Feb 26, 2018
1 parent b204ffe commit 653f743
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/__test__/fetch-sheet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ describe("cleaning rows from GSheets response", () => {
expect(cleaned["falsy"]).toBe(false);
});

it("respects emoji", () => {
const TEST_EMOJI_STRING = "🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑🔑";
const emojiRow = { emoji: TEST_EMOJI_STRING };
const cleaned = cleanRows([emojiRow])[0];
expect(cleaned.emoji).toEqual(TEST_EMOJI_STRING);
});
it("returns comma-delineated number strings as numbers", () => {
const numRow = { short: "1", long: "123,456,789", decimal: "0.5912", mixed: "123,456.789" };
const cleaned = cleanRows([numRow])[0];
Expand Down

0 comments on commit 653f743

Please sign in to comment.