Skip to content

Commit

Permalink
add unit test for suites markOnly method
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidOtt committed May 5, 2020
1 parent 4b37e3c commit c2c8dc8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/unit/suite.spec.js
Expand Up @@ -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() {
Expand Down

0 comments on commit c2c8dc8

Please sign in to comment.