From aa4fd162f6f19f333446ac6d2d6dc0bb29e8aaae Mon Sep 17 00:00:00 2001 From: juergba Date: Fri, 28 Dec 2018 14:44:33 +0100 Subject: [PATCH] tests --- test/unit/suite.spec.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/unit/suite.spec.js b/test/unit/suite.spec.js index 50a0bda332..7992aefae5 100644 --- a/test/unit/suite.spec.js +++ b/test/unit/suite.spec.js @@ -390,7 +390,7 @@ describe('Suite', function() { describe('when there is a parent', function() { describe('the parent is the root suite', function() { it('returns the suite title', function() { - var parentSuite = new Suite(''); + var parentSuite = new Suite('', {}, true); parentSuite.addSuite(this.suite); expect(this.suite.titlePath(), 'to equal', ['A Suite']); }); @@ -493,6 +493,16 @@ describe('Suite', function() { new Suite('Bdd suite', 'root'); }, 'not to throw'); }); + + it('should be root suite', function() { + var rootSuite = new Suite('', {}, true); + expect(rootSuite.root, 'to be', true); + }); + + it('should not be root suite', function() { + var suite = new Suite(''); + expect(suite.root, 'to be', false); + }); }); describe('timeout()', function() {