Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
add coverage to Context; remove unused Context#inspect() (mochajs#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 committed Oct 6, 2017
1 parent 542b988 commit c516eb5
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
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
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 c516eb5

Please sign in to comment.