Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

add coverage to Context; remove unused Context#inspect() (#3057)

Christopher Hiller9f204ba2b27e
diff --git a/lib/context.js b/lib/context.js
index 38b2de28..073643b8 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 cbcdedb4..75a85f6c 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);
+ });
});
});