File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 11import { emitWarning } from 'node:process'
2- import { promisify } from 'node:util '
2+ import { setImmediate } from 'node:timers/promises '
33
44import test from 'ava'
55import ModernError from 'modern-errors'
@@ -8,9 +8,6 @@ import { each } from 'test-each'
88
99import modernErrorsProcess from 'modern-errors-process'
1010
11- // TODO: use `timers/promises` after dropping support for Node <15
12- const pSetInterval = promisify ( setInterval )
13-
1411const BaseError = ModernError . subclass ( 'BaseError' , {
1512 plugins : [ modernErrorsProcess ] ,
1613} )
2825
2926const createProcessError = async ( error ) => {
3027 emitWarning ( error )
31- await pSetInterval ( )
28+ await setImmediate ( )
3229}
3330
3431test . serial ( 'Prints on the console by default' , async ( t ) => {
You can’t perform that action at this time.
0 commit comments