Skip to content

Commit

Permalink
fix more assertions
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Apr 8, 2018
1 parent efd750c commit 96a2846
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions lib/reporters/json.js
Expand Up @@ -80,6 +80,7 @@ function clean (test) {
err: cleanCycles(err)
};
}

/**
* Replaces any circular references inside `obj` with '[object Object]'
*
Expand Down
14 changes: 7 additions & 7 deletions test/reporters/json.spec.js
Expand Up @@ -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();
});
Expand Down

0 comments on commit 96a2846

Please sign in to comment.