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 4d82234 commit b7b5ba0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ t.test('generic errors streaming from cache propagate to response body', async (
t.teardown(() => {
cacache.get.stream.byDigest = realGet
})
cacache.get.stream.byDigest = (cachePath, integrity) => {
cacache.get.stream.byDigest = () => {
const stream = new Readable({ read: () => {} })
setImmediate(() => {
stream.emit('error', new Error('broken stream'))
Expand Down
2 changes: 1 addition & 1 deletion test/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ t.test('supports passthrough of options on redirect', async (t) => {
.get('/test')
.matchHeader('x-test', 'test')
.reply(200, CONTENT, {
'test-header': (req, res, body) => {
'test-header': (req) => {
t.ok(req.headers['x-test'].length)
t.equal(req.headers['x-test'][0], 'test', 'headers from redriect')
return 'truthy'
Expand Down
18 changes: 9 additions & 9 deletions test/options.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict'
const dns = require('dns')
const configureOptions = require('../lib/options.js')
const { test } = require('tap')
const t = require('tap')

const defaultDns = { ttl: 5 * 60 * 1000, lookup: dns.lookup }

test('configure options', async (t) => {
test('supplied with no value', async (t) => {
t.test('configure options', async (t) => {
t.test('supplied with no value', async (t) => {
const opts = configureOptions()
const expectedObject = {
method: 'GET',
Expand All @@ -19,7 +19,7 @@ test('configure options', async (t) => {
t.same(opts, expectedObject, 'should return default opts')
})

test('supplied with empty object', async (t) => {
t.test('supplied with empty object', async (t) => {
const opts = configureOptions({})
const expectedObject = {
method: 'GET',
Expand All @@ -32,7 +32,7 @@ test('configure options', async (t) => {
t.same(opts, expectedObject, 'should return default opts')
})

test('changes method to upper case', async (t) => {
t.test('changes method to upper case', async (t) => {
const actualOpts = { method: 'post' }
const opts = configureOptions(actualOpts)
const expectedObject = {
Expand All @@ -46,7 +46,7 @@ test('configure options', async (t) => {
t.same(opts, expectedObject, 'should return upper cased method')
})

test('copies strictSSL to rejectUnauthorized', async (t) => {
t.test('copies strictSSL to rejectUnauthorized', async (t) => {
const trueOpts = configureOptions({ strictSSL: true })
const trueExpectedObject = {
method: 'GET',
Expand Down Expand Up @@ -82,7 +82,7 @@ test('configure options', async (t) => {
'should treat strictSSL: null as true just like tls.connect')
})

test('should set dns property correctly', async (t) => {
t.test('should set dns property correctly', async (t) => {
t.test('no property given', async (t) => {
const actualOpts = { method: 'GET' }
const opts = configureOptions(actualOpts)
Expand Down Expand Up @@ -127,7 +127,7 @@ test('configure options', async (t) => {
})
})

test('should set retry property correctly', async (t) => {
t.test('should set retry property correctly', async (t) => {
t.test('no property given', async (t) => {
const actualOpts = { method: 'GET' }
const opts = configureOptions(actualOpts)
Expand Down Expand Up @@ -199,7 +199,7 @@ test('configure options', async (t) => {
})
})

test('configures cache correctly', async (t) => {
t.test('configures cache correctly', async (t) => {
t.test('supplied with no values', async (t) => {
const actualOpts = {}
const opts = configureOptions(actualOpts)
Expand Down

0 comments on commit b7b5ba0

Please sign in to comment.