Skip to content

Commit 7b84e5b

Browse files
committed
fix: eslint errors
1 parent 6965260 commit 7b84e5b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/unit/concurrency-Queue-test.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,9 @@ describe('Concurrency queue test', () => {
650650
})
651651
const logSpy = sinon.stub()
652652
client.defaults.adapter = () => {
653-
return Promise.reject({ message: 'Connection timeout', code: 'ECONNABORTED' })
653+
const err = new Error('Connection timeout')
654+
err.code = 'ECONNABORTED'
655+
return Promise.reject(err)
654656
}
655657
const queue = new ConcurrencyQueue({
656658
axios: client,
@@ -679,7 +681,11 @@ describe('Concurrency queue test', () => {
679681
baseURL: `${host}:${port}`
680682
})
681683
const pluginReplacesWithNoConfig = {
682-
onResponse: (err) => new Error('Plugin replaced error')
684+
onResponse: (err) => {
685+
const e = new Error('Plugin replaced error')
686+
e.originalError = err
687+
return e
688+
}
683689
}
684690
const queue = new ConcurrencyQueue({
685691
axios: client,

0 commit comments

Comments
 (0)