2
2
'use strict' ;
3
3
require ( '../common' ) ;
4
4
const assert = require ( 'node:assert' ) ;
5
- const { describe, it } = require ( 'node:test' ) ;
5
+ const { describe, it, test } = require ( 'node:test' ) ;
6
6
const util = require ( 'util' ) ;
7
7
8
8
@@ -41,6 +41,8 @@ it('async pass', async () => {
41
41
42
42
} ) ;
43
43
44
+ test ( 'mixing describe/it and test should work' , ( ) => { } ) ;
45
+
44
46
it ( 'async throw fail' , async ( ) => {
45
47
throw new Error ( 'thrown from async throw fail' ) ;
46
48
} ) ;
@@ -95,6 +97,7 @@ describe('subtest sync throw fail', () => {
95
97
it ( '+sync throw fail' , ( ) => {
96
98
throw new Error ( 'thrown from subtest sync throw fail' ) ;
97
99
} ) ;
100
+ test ( 'mixing describe/it and test should work' , ( ) => { } ) ;
98
101
} ) ;
99
102
100
103
it ( 'sync throw non-error fail' , async ( ) => {
@@ -106,7 +109,7 @@ describe('level 0a', { concurrency: 4 }, () => {
106
109
const p1a = new Promise ( ( resolve ) => {
107
110
setTimeout ( ( ) => {
108
111
resolve ( ) ;
109
- } , 1000 ) ;
112
+ } , 100 ) ;
110
113
} ) ;
111
114
112
115
return p1a ;
@@ -124,7 +127,7 @@ describe('level 0a', { concurrency: 4 }, () => {
124
127
const p1c = new Promise ( ( resolve ) => {
125
128
setTimeout ( ( ) => {
126
129
resolve ( ) ;
127
- } , 2000 ) ;
130
+ } , 200 ) ;
128
131
} ) ;
129
132
130
133
return p1c ;
@@ -134,7 +137,7 @@ describe('level 0a', { concurrency: 4 }, () => {
134
137
const p1c = new Promise ( ( resolve ) => {
135
138
setTimeout ( ( ) => {
136
139
resolve ( ) ;
137
- } , 1500 ) ;
140
+ } , 150 ) ;
138
141
} ) ;
139
142
140
143
return p1c ;
@@ -143,7 +146,7 @@ describe('level 0a', { concurrency: 4 }, () => {
143
146
const p0a = new Promise ( ( resolve ) => {
144
147
setTimeout ( ( ) => {
145
148
resolve ( ) ;
146
- } , 3000 ) ;
149
+ } , 300 ) ;
147
150
} ) ;
148
151
149
152
return p0a ;
@@ -309,12 +312,12 @@ describe('describe async throw fails', async () => {
309
312
describe ( 'timeouts' , ( ) => {
310
313
it ( 'timed out async test' , { timeout : 5 } , async ( ) => {
311
314
return new Promise ( ( resolve ) => {
312
- setTimeout ( resolve , 1000 ) ;
315
+ setTimeout ( resolve , 100 ) ;
313
316
} ) ;
314
317
} ) ;
315
318
316
319
it ( 'timed out callback test' , { timeout : 5 } , ( done ) => {
317
- setTimeout ( done , 1000 ) ;
320
+ setTimeout ( done , 100 ) ;
318
321
} ) ;
319
322
320
323
0 commit comments