Skip to content

Commit eb38d1d

Browse files
committed
Fix linting
1 parent 031db95 commit eb38d1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { setImmediate } from 'node:timers/promises'
33

44
import test from 'ava'
55
import ModernError from 'modern-errors'
6-
import sinon from 'sinon'
6+
import { stub, spy } from 'sinon'
77
import { each } from 'test-each'
88

99
import modernErrorsProcess from 'modern-errors-process'
@@ -30,7 +30,7 @@ const createProcessError = async (error) => {
3030

3131
test.serial('Prints on the console by default', async (t) => {
3232
// eslint-disable-next-line no-restricted-globals
33-
const consoleError = sinon.stub(console, 'error')
33+
const consoleError = stub(console, 'error')
3434
const stopLogging = BaseError.logProcess()
3535
const error = new BaseError('test')
3636
await createProcessError(error)
@@ -40,7 +40,7 @@ test.serial('Prints on the console by default', async (t) => {
4040
})
4141

4242
test.serial('Handles process errors', async (t) => {
43-
const onError = sinon.spy()
43+
const onError = spy()
4444
const stopLogging = BaseError.logProcess({ onError })
4545
const error = new BaseError('test')
4646
await createProcessError(error)
@@ -87,7 +87,7 @@ each(
8787
test.serial(
8888
`Process errors are normalized to ErrorClass | ${title}`,
8989
async (t) => {
90-
const onError = sinon.spy()
90+
const onError = spy()
9191
const stopLogging = ErrorClass.logProcess({ onError })
9292
await createProcessError(error)
9393
t.is(onError.args[0][0].constructor, expectedConstructor)

0 commit comments

Comments
 (0)