Skip to content

Commit b77ca2c

Browse files
authored
test: replace typeof undefined check (#420)
1 parent 08e72cb commit b77ca2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/static.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ t.test('sendFile disabled', (t) => {
10001000
fastify.register(fastifyStatic, pluginOptions)
10011001

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

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

13181318
fastify.get('/foo/bar', function (req, reply) {
1319-
if (typeof reply.download === 'undefined') {
1319+
if (reply.download === undefined) {
13201320
t.equal(reply.download, undefined)
13211321
reply.send('pass')
13221322
} else {

0 commit comments

Comments
 (0)