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(); });