33'use strict'
44require ( '../common' )
55const assert = require ( 'node:assert' )
6- const { describe, it } = require ( '# node:test' )
6+ const { describe, it, test } = require ( 'node:test' )
77const util = require ( 'util' )
88
99it . todo ( 'sync pass todo' , ( ) => {
@@ -41,6 +41,8 @@ it('async pass', async () => {
4141
4242} )
4343
44+ test ( 'mixing describe/it and test should work' , ( ) => { } )
45+
4446it ( 'async throw fail' , async ( ) => {
4547 throw new Error ( 'thrown from async throw fail' )
4648} )
@@ -95,6 +97,7 @@ describe('subtest sync throw fail', () => {
9597 it ( '+sync throw fail' , ( ) => {
9698 throw new Error ( 'thrown from subtest sync throw fail' )
9799 } )
100+ test ( 'mixing describe/it and test should work' , ( ) => { } )
98101} )
99102
100103it ( 'sync throw non-error fail' , async ( ) => {
@@ -106,7 +109,7 @@ describe('level 0a', { concurrency: 4 }, () => {
106109 const p1a = new Promise ( ( resolve ) => {
107110 setTimeout ( ( ) => {
108111 resolve ( )
109- } , 1000 )
112+ } , 100 )
110113 } )
111114
112115 return p1a
@@ -124,7 +127,7 @@ describe('level 0a', { concurrency: 4 }, () => {
124127 const p1c = new Promise ( ( resolve ) => {
125128 setTimeout ( ( ) => {
126129 resolve ( )
127- } , 2000 )
130+ } , 200 )
128131 } )
129132
130133 return p1c
@@ -134,7 +137,7 @@ describe('level 0a', { concurrency: 4 }, () => {
134137 const p1c = new Promise ( ( resolve ) => {
135138 setTimeout ( ( ) => {
136139 resolve ( )
137- } , 1500 )
140+ } , 150 )
138141 } )
139142
140143 return p1c
@@ -143,7 +146,7 @@ describe('level 0a', { concurrency: 4 }, () => {
143146 const p0a = new Promise ( ( resolve ) => {
144147 setTimeout ( ( ) => {
145148 resolve ( )
146- } , 3000 )
149+ } , 300 )
147150 } )
148151
149152 return p0a
@@ -308,12 +311,12 @@ describe('describe async throw fails', async () => {
308311describe ( 'timeouts' , ( ) => {
309312 it ( 'timed out async test' , { timeout : 5 } , async ( ) => {
310313 return new Promise ( ( resolve ) => {
311- setTimeout ( resolve , 1000 )
314+ setTimeout ( resolve , 100 )
312315 } )
313316 } )
314317
315318 it ( 'timed out callback test' , { timeout : 5 } , ( done ) => {
316- setTimeout ( done , 1000 )
319+ setTimeout ( done , 100 )
317320 } )
318321
319322 it ( 'large timeout async test is ok' , { timeout : 30_000_000 } , async ( ) => {
0 commit comments