@@ -200,7 +200,7 @@ describe('@stacksjs/browser', () => {
200
200
let resolve1 : ( ) => void
201
201
let resolve2 : ( ) => void
202
202
203
- console . log ( 'Test started' )
203
+ // console.log('Test started')
204
204
205
205
const promise1 = new Promise < void > ( ( r ) => {
206
206
resolve1 = r
@@ -210,32 +210,32 @@ describe('@stacksjs/browser', () => {
210
210
} )
211
211
212
212
lock . run ( async ( ) => {
213
- console . log ( 'Task 1 started' )
213
+ // console.log('Task 1 started')
214
214
await promise1
215
215
results . push ( 1 )
216
- console . log ( 'Task 1 completed' )
216
+ // console.log('Task 1 completed')
217
217
} )
218
218
219
219
lock . run ( async ( ) => {
220
- console . log ( 'Task 2 started' )
220
+ // console.log('Task 2 started')
221
221
await promise2
222
222
results . push ( 2 )
223
- console . log ( 'Task 2 completed' )
223
+ // console.log('Task 2 completed')
224
224
} )
225
225
226
- console . log ( 'Resolving promise 2' )
226
+ // console.log('Resolving promise 2')
227
227
// biome-ignore lint/style/noNonNullAssertion: we know it is defined here
228
228
resolve2 ! ( )
229
229
await browser . sleep ( 10 )
230
- console . log ( 'Resolving promise 1' )
230
+ // console.log('Resolving promise 1')
231
231
// biome-ignore lint/style/noNonNullAssertion: we know it is defined here
232
232
resolve1 ! ( )
233
233
234
- console . log ( 'Waiting for lock' )
234
+ // console.log('Waiting for lock')
235
235
await lock . wait ( )
236
- console . log ( 'Lock wait completed' )
236
+ // console.log('Lock wait completed')
237
237
238
- console . log ( 'Final results:' , results )
238
+ // console.log('Final results:', results)
239
239
expect ( results ) . toEqual ( [ 1 , 2 ] )
240
240
} )
241
241
@@ -396,10 +396,10 @@ describe('@stacksjs/browser', () => {
396
396
testCases . forEach ( ( { name, fn } ) => {
397
397
it ( `${ name } function pauses execution for the specified time` , async ( ) => {
398
398
const start = Date . now ( )
399
- await fn ( 100 )
399
+ await fn ( 50 )
400
400
const duration = Date . now ( ) - start
401
- expect ( duration ) . toBeGreaterThanOrEqual ( 95 )
402
- expect ( duration ) . toBeLessThan ( 150 ) // Allow for some overhead, but not too much
401
+ expect ( duration ) . toBeGreaterThanOrEqual ( 45 )
402
+ expect ( duration ) . toBeLessThan ( 105 ) // Allow for some overhead, but not too much
403
403
} )
404
404
405
405
it ( `${ name } function works with 0ms` , async ( ) => {
0 commit comments