From 672ef7babee01b630a22962fff9759317f248b3e Mon Sep 17 00:00:00 2001 From: Nikolaus Piccolotto Date: Tue, 6 Jun 2017 20:57:24 +0200 Subject: [PATCH] fix: tests --- test/spec/collection.test.js | 4 +--- test/spec/map.test.js | 12 +++++------- test/spec/nilable.test.js | 2 +- test/spec/or.test.js | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/test/spec/collection.test.js b/test/spec/collection.test.js index cdfd05a..ef89999 100644 --- a/test/spec/collection.test.js +++ b/test/spec/collection.test.js @@ -56,9 +56,7 @@ describe("collection", () => { expect(problems).to.be.an("array") .and.have.length(1) expect(problems).to.have.deep.property("[0].value") - .that.deep.equals({ - name: 3000 - }) + .that.deep.equals(3000) expect(problems).to.have.deep.property("[0].predicate") .that.is.a("function") expect(problems).to.have.deep.property("[0].via") diff --git a/test/spec/map.test.js b/test/spec/map.test.js index 373d707..6d257eb 100644 --- a/test/spec/map.test.js +++ b/test/spec/map.test.js @@ -48,7 +48,7 @@ describe("map", () => { .and.deep.equals(["friend", "school", "Keys(school)"]); expect(missingKey).to.have.deep .property("[0].value") - .that.deep.equals(value); + .that.deep.equals(value.school); }); it("[invalid key]", () => { @@ -68,10 +68,10 @@ describe("map", () => { .that.deep.equals(["school", "district"]); expect(invalidKey).to.have.deep .property("[0].via") - .that.deep.equals(["friend", "school", "Keys(school)"]); + .that.deep.equals(["friend", "school", "isString"]); expect(invalidKey).to.have.deep .property("[0].value") - .that.deep.equals(value); + .that.deep.equals(9); }); }); @@ -100,7 +100,7 @@ describe("map", () => { .that.is.an("array") .and.deep.equals(["friend", "Keys(friend)"]); expect(missingKey).to.have.deep.property("[0].value").that.deep.equals({ - district: "xhain" + district: 'xhain' }); }); @@ -118,9 +118,7 @@ describe("map", () => { expect(invalidKey).to.have.deep .property("[0].via") .that.deep.equals(["friend", "isString"]); - expect(invalidKey).to.have.deep.property("[0].value").that.deep.equals({ - name: 3000 - }); + expect(invalidKey).to.have.deep.property("[0].value").that.deep.equals(3000); }); }); }); diff --git a/test/spec/nilable.test.js b/test/spec/nilable.test.js index 89d87cd..dc940ec 100644 --- a/test/spec/nilable.test.js +++ b/test/spec/nilable.test.js @@ -27,7 +27,7 @@ describe("nilable", () => { expect(problems).to.have.deep.property("[0].predicate") .that.is.a("function") expect(problems).to.have.deep.property("[0].value") - .that.deep.equals(f) + .that.deep.equals(f.name) }) }) }) diff --git a/test/spec/or.test.js b/test/spec/or.test.js index 7f67fe5..a7fcd5e 100644 --- a/test/spec/or.test.js +++ b/test/spec/or.test.js @@ -65,7 +65,7 @@ describe("or", () => { expect(problems).to.have.deep .property("[1].predicate") .that.is.a("function"); - expect(problems).to.have.deep.property("[1].value").that.equals(err); + expect(problems).to.have.deep.property("[1].value").that.equals(err.name); }); }); });