|
| 1 | +// Object. |
| 2 | +import { is } from '@angular-package/type'; |
| 3 | +// Class. |
| 4 | +import { Testing } from '../lib/testing.class'; |
| 5 | +/** |
| 6 | + * Initialize testing. |
| 7 | + */ |
| 8 | +const t = new Testing( |
| 9 | + true, // Disallows executing the `describe()` method globally. |
| 10 | + true, // Disallows executing the `it()` method globally. |
| 11 | + { |
| 12 | + // describe: [1, 2, 3, 5], // Executable unique numbers of `describe()` methods to execute when global executing is disallowed. |
| 13 | + // it: [1], // Executable unique numbers of `it()` methods inside the `describe()` to execute when global executing is disallowed. |
| 14 | + }, |
| 15 | + true |
| 16 | +); |
| 17 | + |
| 18 | +t.describe('[counter] First describe', () => |
| 19 | + t |
| 20 | + .it('[counter] First it() in first describe 1-1', () => |
| 21 | + expect(false).toBeFalse() |
| 22 | + ) |
| 23 | + .it('[counter] Second it() in first describe 1-2', () => |
| 24 | + expect(true).toBeTrue() |
| 25 | + ) |
| 26 | + .it('[counter] Second it() in first describe 1-3', () => |
| 27 | + expect(true).toBeTrue() |
| 28 | + ) |
| 29 | + .it('[counter] Fourth it() in first describe() 1-4', () => |
| 30 | + expect(true).toBeTrue() |
| 31 | + ) |
| 32 | + .describe('[counter] Second describe()', () => { |
| 33 | + t.it('[counter] First it() in second describe() 2-1', () => |
| 34 | + expect(true).toBeTrue() |
| 35 | + ); |
| 36 | + }) |
| 37 | + .describe('[counter] Third describe()', () => { |
| 38 | + t.it('[counter] First it() in third describe() 3-1', () => |
| 39 | + expect(true).toBeTrue() |
| 40 | + ); |
| 41 | + }) |
| 42 | + .describe('[counter] Fourth describe()', () => { |
| 43 | + t.it('[counter] First it() in fourth describe() 4-1', () => |
| 44 | + expect(true).toBeTrue() |
| 45 | + ); |
| 46 | + }) |
| 47 | +); |
| 48 | + |
| 49 | +t.describe('[counter] Fifth describe', () => |
| 50 | + t.it('[counter] First it() in fifth describe 5-1', () => |
| 51 | + expect(false).toBeFalse() |
| 52 | + ) |
| 53 | +); |
0 commit comments