Skip to content

Commit d9cb644

Browse files
committed
Add a test
1 parent af53ee3 commit d9cb644

File tree

1 file changed

+8
-0
lines changed
  • workspaces/adventure-pack/goodies/typescript/String.prototype.caesar

1 file changed

+8
-0
lines changed

workspaces/adventure-pack/goodies/typescript/String.prototype.caesar/index.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ describe("String.prototype.caesar", () => {
2828
expect("Civis Romanus sum.".caesar()).toBe("Djwjt Spnbovt tvn.");
2929
});
3030

31+
it("handles empty string", () => {
32+
expect("".caesar()).toBe("");
33+
expect("".caesar(13)).toBe("");
34+
expect("".caesar(-27)).toBe("");
35+
expect("".caesar(-2)).toBe("");
36+
expect("".caesar(42)).toBe("");
37+
});
38+
3139
// TODO: test ROT-13
3240

3341
// TODO: test Unicode characters

0 commit comments

Comments
 (0)