Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Suite.prototype.clone = function() {
var suite = new Suite(this.title);
debug('clone');
suite.ctx = this.ctx;
suite.root = this.root;
suite.timeout(this.timeout());
suite.retries(this.retries());
suite.enableTimeouts(this.enableTimeouts());
Expand Down
6 changes: 5 additions & 1 deletion test/unit/suite.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Suite', function() {

describe('.clone()', function() {
beforeEach(function() {
this.suite = new Suite('To be cloned');
this.suite = new Suite('To be cloned', {}, true);
this.suite._timeout = 3043;
this.suite._slow = 101;
this.suite._bail = true;
Expand Down Expand Up @@ -74,6 +74,10 @@ describe('Suite', function() {
it('should not copy the values from the _afterAll array', function() {
expect(this.suite.clone()._afterAll, 'to be empty');
});

it('should copy the root property', function() {
expect(this.suite.clone().root, 'to be', true);
});
});

describe('.timeout()', function() {
Expand Down