Skip to content

Commit

Permalink
chore: fix linting in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Apr 30, 2024
1 parent 7cc481b commit bdc9039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/check-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ t.test('log x-fetch-attempts header value', async t => {
t.test('log the url fetched', t => {
const headers = new Headers()
const EE = require('events')
headers.get = header => undefined
headers.get = () => undefined
const res = Object.assign({}, mockFetchRes, {
headers,
status: 200,
Expand Down Expand Up @@ -110,7 +110,7 @@ t.test('log the url fetched', t => {
t.test('redact password from log', t => {
const headers = new Headers()
const EE = require('events')
headers.get = header => undefined
headers.get = () => undefined
const res = Object.assign({}, mockFetchRes, {
headers,
status: 200,
Expand Down Expand Up @@ -138,7 +138,7 @@ t.test('redact password from log', t => {
t.test('redact well known token from log', t => {
const headers = new Headers()
const EE = require('events')
headers.get = header => undefined
headers.get = () => undefined
const res = Object.assign({}, mockFetchRes, {
headers,
status: 200,
Expand Down
8 changes: 4 additions & 4 deletions test/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ t.test('OTP error with prompt', async t => {
}
return true
})
.reply((...args) => {
.reply(() => {
if (OTP === '12345') {
return [200, { ok: 'this is fine' }, {}]
} else {
Expand Down Expand Up @@ -171,7 +171,7 @@ t.test('OTP error with prompt, expired OTP in settings', async t => {
}
return true
})
.reply((...args) => {
.reply(() => {
if (OTP === '12345') {
return [200, { ok: 'this is fine' }, {}]
} else {
Expand All @@ -189,7 +189,7 @@ t.test('OTP error with prompt, expired OTP in settings', async t => {
t.test('OTP error with prompt that fails', t => {
tnock(t, OPTS.registry)
.get('/otplease')
.reply((...args) => {
.reply(() => {
return [401, { error: 'otp, please' }, { 'www-authenticate': 'otp' }]
})

Expand All @@ -202,7 +202,7 @@ t.test('OTP error with prompt that fails', t => {
t.test('OTP error with prompt that returns nothing', t => {
tnock(t, OPTS.registry)
.get('/otplease')
.reply((...args) => {
.reply(() => {
return [401, { error: 'otp, please' }, { 'www-authenticate': 'otp' }]
})

Expand Down

0 comments on commit bdc9039

Please sign in to comment.