From 9f204ba2b27e254e70e88ab353e8c4cedc7b67f6 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 6 Oct 2017 11:26:18 -0700 Subject: [PATCH] add coverage to Context; remove unused Context#inspect() (#3057) * add coverage to Context; remove unused Context#inspect() * remove errant require() --- lib/context.js | 12 ------------ test/unit/context.spec.js | 14 +++++++++++--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/lib/context.js b/lib/context.js index 38b2de28b3..073643b8b6 100644 --- a/lib/context.js +++ b/lib/context.js @@ -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); -}; diff --git a/test/unit/context.spec.js b/test/unit/context.spec.js index cbcdedb49d..75a85f6c19 100644 --- a/test/unit/context.spec.js +++ b/test/unit/context.spec.js @@ -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); + }); }); });