Skip to content

Commit

Permalink
test: replace typeof undefined check (#420)
Browse files Browse the repository at this point in the history
Fdawgs authored Oct 29, 2023
1 parent 08e72cb commit b77ca2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/static.test.js
Original file line number Diff line number Diff line change
@@ -1000,7 +1000,7 @@ t.test('sendFile disabled', (t) => {
fastify.register(fastifyStatic, pluginOptions)

fastify.get('/foo/bar', function (req, reply) {
if (typeof reply.sendFile === 'undefined') {
if (reply.sendFile === undefined) {
reply.send('pass')
} else {
reply.send('fail')
@@ -1277,7 +1277,7 @@ t.test('sendFile disabled', (t) => {
fastify.register(fastifyStatic, pluginOptions)

fastify.get('/foo/bar', function (req, reply) {
if (typeof reply.sendFile === 'undefined') {
if (reply.sendFile === undefined) {
reply.send('pass')
} else {
reply.send('fail')
@@ -1316,7 +1316,7 @@ t.test('download disabled', (t) => {
fastify.register(fastifyStatic, pluginOptions)

fastify.get('/foo/bar', function (req, reply) {
if (typeof reply.download === 'undefined') {
if (reply.download === undefined) {
t.equal(reply.download, undefined)
reply.send('pass')
} else {

0 comments on commit b77ca2c

Please sign in to comment.