| 1 | 'use strict'; |
| 2 | |
| 3 | describe('skip in before with nested describes', function () { |
| 4 | before(function () { |
| 5 | this.skip(); |
| 6 | }); |
| 7 | |
| 8 | it('should never run this test', function () { |
| 9 | throw new Error('never run this test'); |
| 10 | }); |
| 11 | |
| 12 | describe('nested describe', function () { |
| 13 | before(function () { |
| 14 | throw new Error('first level before should not run'); |
| 15 | }); |
| 16 | |
| 17 | it('should never run this test', function () { |
| 18 | throw new Error('never run this test'); |
| 19 | }); |
| 20 | |
| 21 | after(function () { |
| 22 | throw new Error('first level after should not run'); |
| 23 | }); |
| 24 | |
| 25 | describe('nested again', function () { |
| 26 | before(function () { |
| 27 | throw new Error('second level before should not run'); |
| 28 | }); |
| 29 | |
| 30 | it('should never run this test', function () { |
| 31 | throw new Error('never run this test'); |
| 32 | }); |
| 33 | |
| 34 | after(function () { |
| 35 | throw new Error('second level after should not run'); |
| 36 | }); |
| 37 | }); |
| 38 | }); |
| 39 | }); |