Skip to content

Commit

Permalink
test: add test code for logic
Browse files Browse the repository at this point in the history
  • Loading branch information
l2hyunwoo committed Apr 21, 2023
1 parent adb7902 commit 0d8caf2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions __tests__/whitespace.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { isEmptyOrBlank } from "../src/utils/whitespace";

describe("WhiteSpace and empty string should return true", () => {
test("Empty string should return true", () => {
const emptyString = "";
expect(isEmptyOrBlank(emptyString)).toEqual(true);
})
test("WhiteSpace string should return true", () => {
const whiteSpaceString = " ";
expect(isEmptyOrBlank(whiteSpaceString)).toEqual(true);
})
test("NewLine should return true", () => {
const newLineString = "\n\n";
expect(isEmptyOrBlank(newLineString)).toEqual(true);
})
})

0 comments on commit 0d8caf2

Please sign in to comment.