diff --git a/test/unit/suite.spec.js b/test/unit/suite.spec.js index 1be948e1c6..9a55c05c26 100644 --- a/test/unit/suite.spec.js +++ b/test/unit/suite.spec.js @@ -638,6 +638,31 @@ describe('Suite', function() { }); }); }); + + describe('.markOnly()', function() { + var sandbox; + + beforeEach(function() { + sandbox = sinon.createSandbox(); + }); + + afterEach(function() { + sandbox.restore(); + }); + + it('should call appendOnlySuite on parent', function() { + var suite = new Suite('a'); + var spy = sandbox.spy(); + suite.parent = { + appendOnlySuite: spy + }; + suite.markOnly(); + + expect(spy, 'to have a call exhaustively satisfying', [suite]).and( + 'was called once' + ); + }); + }); }); describe('Test', function() {