Skip to content

Commit 0873e47

Browse files
authored
feat: move to tap15 (#59)
* feat: move to tap15 * feat: move to tap15
1 parent 3a8d3b4 commit 0873e47

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.taprc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
check-coverage: false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"pre-commit": "^1.2.2",
3333
"snazzy": "^9.0.0",
3434
"standard": "^16.0.1",
35-
"tap": "^14.10.7"
35+
"tap": "^15.0.2"
3636
},
3737
"dependencies": {
3838
"abstract-cache": "^1.0.1",

test/cache.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test('cache is usable', (t) => {
3131
.register(plugin)
3232

3333
instance.addHook('preParsing', function (req, reply, payload, done) {
34-
t.is(this[Symbol.for('fastify-caching.registered')], true)
34+
t.equal(this[Symbol.for('fastify-caching.registered')], true)
3535
done(null, payload)
3636
})
3737

@@ -45,7 +45,7 @@ test('cache is usable', (t) => {
4545
instance.get('/two', (req, reply) => {
4646
instance.cache.get('one', (err, obj) => {
4747
if (err) t.threw(err)
48-
t.deepEqual(obj.item, { one: true })
48+
t.same(obj.item, { one: true })
4949
reply.send()
5050
})
5151
})
@@ -93,7 +93,7 @@ test('etags get stored in cache', (t) => {
9393
}
9494
http
9595
.get(opts, (res) => {
96-
t.is(res.statusCode, 304)
96+
t.equal(res.statusCode, 304)
9797
})
9898
.on('error', t.threw)
9999
})
@@ -130,7 +130,7 @@ test('etag cache life is customizable', (t) => {
130130
setTimeout(() => {
131131
http
132132
.get(opts, (res) => {
133-
t.is(res.statusCode, 200)
133+
t.equal(res.statusCode, 200)
134134
})
135135
.on('error', t.threw)
136136
}, 150)

test/headers.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test('decorators add headers', (t) => {
3939
const address = `http://127.0.0.1:${portNum}`
4040
http.get(address, (res) => {
4141
t.ok(res.headers.etag)
42-
t.is(res.headers.etag, tag)
42+
t.equal(res.headers.etag, tag)
4343
}).on('error', (err) => t.threw(err))
4444
})
4545
})
@@ -59,7 +59,7 @@ test('sets no-cache header', (t) => {
5959

6060
http.get(address, (res) => {
6161
t.ok(res.headers['cache-control'])
62-
t.is(res.headers['cache-control'], 'no-cache')
62+
t.equal(res.headers['cache-control'], 'no-cache')
6363
}).on('error', (err) => t.threw(err))
6464
})
6565
})
@@ -83,7 +83,7 @@ test('sets private with max-age header', (t) => {
8383

8484
http.get(address, (res) => {
8585
t.ok(res.headers['cache-control'])
86-
t.is(res.headers['cache-control'], 'private, max-age=300')
86+
t.equal(res.headers['cache-control'], 'private, max-age=300')
8787
}).on('error', (err) => t.threw(err))
8888
})
8989
})
@@ -103,7 +103,7 @@ test('sets no-store with max-age header', (t) => {
103103

104104
http.get(address, (res) => {
105105
t.ok(res.headers['cache-control'])
106-
t.is(res.headers['cache-control'], 'no-store, max-age=300')
106+
t.equal(res.headers['cache-control'], 'no-store, max-age=300')
107107
}).on('error', (err) => t.threw(err))
108108
})
109109
})
@@ -126,7 +126,7 @@ test('sets the expires header', (t) => {
126126

127127
http.get(address, (res) => {
128128
t.ok(res.headers.expires)
129-
t.is(res.headers.expires, now.toUTCString())
129+
t.equal(res.headers.expires, now.toUTCString())
130130
}).on('error', (err) => t.threw(err))
131131
})
132132
})

0 commit comments

Comments
 (0)