Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
duart38 committed Mar 15, 2021
1 parent a1e154f commit 6f0924c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/STRING_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,11 @@ Deno.test("STRING adapt test", () => {
Deno.test("STRING adapt via do() test", () => {
const t = STRING("hello").contains("hello").do((prev: string)=>prev += " world").getValue();
assertStringIncludes(t, "hello world");
});

Deno.test("STRING does not change if do method is not reached", () => {
const t = STRING("hello")
.contains("x")
.do((prev: string)=>prev += " world").getValue();
assertStringIncludes(t, "hello");
});

0 comments on commit 6f0924c

Please sign in to comment.