From 96a28465e364de8d85c29911978226f73516d680 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Sat, 7 Apr 2018 21:12:26 -0700 Subject: [PATCH] fix more assertions Signed-off-by: Christopher Hiller --- lib/reporters/json.js | 1 + test/reporters/json.spec.js | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/reporters/json.js b/lib/reporters/json.js index c0f808dbe3..efc79b4b02 100644 --- a/lib/reporters/json.js +++ b/lib/reporters/json.js @@ -80,6 +80,7 @@ function clean (test) { err: cleanCycles(err) }; } + /** * Replaces any circular references inside `obj` with '[object Object]' * diff --git a/test/reporters/json.spec.js b/test/reporters/json.spec.js index 28f8eb3457..a40eead75f 100644 --- a/test/reporters/json.spec.js +++ b/test/reporters/json.spec.js @@ -72,15 +72,15 @@ describe('json reporter', function () { })); runner.run(function (failureCount) { - failureCount.should.be.exactly(1); - runner.should.have.property('testResults'); - runner.testResults.should.have.property('failures'); - runner.testResults.failures.should.be.an.instanceOf(Array); - runner.testResults.failures.should.have.a.lengthOf(1); + expect(failureCount).to.equal(1); + expect(runner).to.have.property('testResults'); + expect(runner.testResults).to.have.property('failures'); + expect(runner.testResults.failures).to.be.an(Array); + expect(runner.testResults.failures).to.have.length(1); var failure = runner.testResults.failures[0]; - failure.should.have.property('title', testTitle); - failure.should.have.properties('err'); + expect(failure).to.have.property('title', testTitle); + expect(failure).to.have.property('err'); done(); });