diff --git a/tests/STRING_test.ts b/tests/STRING_test.ts index 0be3b19..e3aa435 100644 --- a/tests/STRING_test.ts +++ b/tests/STRING_test.ts @@ -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"); }); \ No newline at end of file