From 539afc00224e263b80602fc44f2c40b32f37e1a9 Mon Sep 17 00:00:00 2001 From: Trent W Date: Mon, 3 Apr 2017 23:12:16 -0500 Subject: [PATCH] Update ch4-q02.spec.js updated test suite to work with new class. --- src/chapter4/ch4-q02.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chapter4/ch4-q02.spec.js b/src/chapter4/ch4-q02.spec.js index 487e902..bbaf031 100644 --- a/src/chapter4/ch4-q02.spec.js +++ b/src/chapter4/ch4-q02.spec.js @@ -9,14 +9,14 @@ for (let key in funcs) { it('returns empty tree with no values', function() { let tree = func(null); - expect(tree.root).to.be.null; + expect(tree).to.be.null; tree = func([]); - expect(tree.root).to.be.null; + expect(tree).to.be.null; }); it('returns tree with root node set with one value', function() { let tree = func([10]); - expect(tree.root.val).to.equal(10); + expect(tree.val).to.equal(10); }); it('returns a balanced tree with 10 nodes', function() {