From dbb1960a79be27909e50320318c948cfdb265527 Mon Sep 17 00:00:00 2001
From: Josh Goebel <me@joshgoebel.com>
Date: Sun, 8 Mar 2020 00:48:24 -0500
Subject: [PATCH] improve zipper tests

---
 exercises/zipper/zipper.spec.js | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/exercises/zipper/zipper.spec.js b/exercises/zipper/zipper.spec.js
index 9c9122a6dd..e9ba3bf1a5 100644
--- a/exercises/zipper/zipper.spec.js
+++ b/exercises/zipper/zipper.spec.js
@@ -27,6 +27,36 @@ describe('Zipper', () => {
     zipper = Zipper.fromTree(t1);
   });
 
+  test('left returns a new Zipper', () => {
+    let left = zipper.left();
+    expect(left).not.toBe(zipper)
+  })
+
+  test('right returns a new Zipper', () => {
+    let right = zipper.right();
+    expect(right).not.toBe(zipper)
+  })
+
+  test('setValue returns a new Zipper', () => {
+    let anotherZipper = zipper.setValue(99);
+    expect(anotherZipper).not.toBe(zipper)
+  })
+
+  test('setRight returns a new Zipper', () => {
+    let right = zipper.setRight(bt(55,null,null));
+    expect(right).not.toBe(zipper)
+  })
+
+  test('setLeft returns a new Zipper', () => {
+    let left = zipper.setLeft(bt(55,null,null));
+    expect(left).not.toBe(zipper)
+  })
+
+  test('up returns a new Zipper', () => {
+    let up = zipper.right().up();
+    expect(zipper).not.toBe(up)
+  })
+
   test('data is retained', () => {
     expect(zipper.toTree()).toEqual(t1);
   });