Skip to content

Commit

Permalink
add coverage to Context; remove unused Context#inspect() (#3057)
Browse files Browse the repository at this point in the history
* add coverage to Context; remove unused Context#inspect()

* remove errant require()
  • Loading branch information
boneskull authored Oct 6, 2017
1 parent 3ff53a4 commit 9f204ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
12 changes: 0 additions & 12 deletions lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,3 @@ Context.prototype.retries = function (n) {
this.runnable().retries(n);
return this;
};

/**
* Inspect the context void of `._runnable`.
*
* @api private
* @return {string}
*/
Context.prototype.inspect = function () {
return JSON.stringify(this, function (key, val) {
return key === 'runnable' || key === 'test' ? undefined : val;
}, 2);
};
14 changes: 11 additions & 3 deletions test/unit/context.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,16 @@ describe('Context Siblings', function () {
});
});

describe('timeout()', function () {
it('should return the timeout', function () {
expect(this.timeout()).to.equal(200);
describe('methods', function () {
describe('timeout()', function () {
it('should return the timeout', function () {
expect(this.timeout()).to.equal(200);
});
});

describe('retries', function () {
it('should return the number of retries', function () {
expect(this.retries()).to.equal(-1);
});
});
});

0 comments on commit 9f204ba

Please sign in to comment.