From 6f0924cafb7aef6712ac4f0319d6f04d4232c5c1 Mon Sep 17 00:00:00 2001 From: duart38 Date: Mon, 15 Mar 2021 21:56:34 +0100 Subject: [PATCH] added test --- tests/STRING_test.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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