Skip to content

Commit 94eff6d

Browse files
authored
Bumped to -rc.4 and removed warnings (#84)
1 parent fd8ee59 commit 94eff6d

File tree

8 files changed

+13
-23
lines changed

8 files changed

+13
-23
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
} from "http2";
2828

2929
declare module "fastify" {
30-
interface FastifyReplyInterface {
30+
interface FastifyReply {
3131
from(
3232
source?: string,
3333
opts?: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"homepage": "https://github.com/fastify/fastify-reply-from#readme",
3131
"devDependencies": {
3232
"@types/node": "^14.0.4",
33-
"fastify": "^3.0.0-rc.1",
33+
"fastify": "^3.0.0-rc.4",
3434
"got": "^11.1.3",
3535
"h2url": "^0.2.0",
3636
"msgpack5": "^4.2.1",

test/full-post-stream.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ instance.register(From)
1212
t.plan(8)
1313
t.tearDown(instance.close.bind(instance))
1414

15-
instance.addContentTypeParser('application/octet-stream', function (req, done) {
16-
done(null, req)
15+
instance.addContentTypeParser('application/octet-stream', function (req, payload, done) {
16+
done(null, payload)
1717
})
1818

1919
t.tearDown(instance.close.bind(instance))

test/http-http2.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ test('http -> http2', async (t) => {
3737
await instance.listen(0)
3838

3939
try {
40-
await got(`http://localhost:${instance.server.address().port}`, {
41-
rejectUnauthorized: false
42-
})
40+
await got(`http://localhost:${instance.server.address().port}`)
4341
} catch (err) {
4442
t.equal(err.response.statusCode, 404)
4543
t.equal(err.response.headers['x-my-header'], 'hello!')

test/http2-https.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ async function run () {
6262
t.test('https -> https', async (t) => {
6363
try {
6464
await got(`https://localhost:${instance.server.address().port}`, {
65-
rejectUnauthorized: false
65+
https: {
66+
rejectUnauthorized: false
67+
}
6668
})
6769
} catch (err) {
6870
t.equal(err.response.statusCode, 404)

test/http2-invalid-target.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ test('http -> http2', async (t) => {
2121
await instance.listen(0)
2222

2323
try {
24-
await got(`http://localhost:${instance.server.address().port}`, {
25-
rejectUnauthorized: false
26-
})
24+
await got(`http://localhost:${instance.server.address().port}`)
2725
} catch (err) {
2826
t.equal(err.response.statusCode, 503)
2927
t.match(err.response.headers['content-type'], /application\/json/)

test/http2-target-crash.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ test('http -> http2 crash', async (t) => {
3838

3939
try {
4040
await target.close()
41-
await got(`http://localhost:${instance.server.address().port}`, {
42-
rejectUnauthorized: false
43-
})
41+
await got(`http://localhost:${instance.server.address().port}`)
4442
} catch (err) {
4543
t.equal(err.response.statusCode, 503)
4644
t.match(err.response.headers['content-type'], /application\/json/)

test/http2-target-multi-crash.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,13 @@ test('http -> http2 crash multiple times', async (t) => {
2525
try {
2626
let target = setupTarget()
2727
await target.listen(3128)
28-
await got(`http://localhost:${instance.server.address().port}`, {
29-
rejectUnauthorized: false
30-
})
28+
await got(`http://localhost:${instance.server.address().port}`)
3129
await target.close()
3230
target = setupTarget()
3331
await target.listen(3128)
34-
await got(`http://localhost:${instance.server.address().port}`, {
35-
rejectUnauthorized: false
36-
})
32+
await got(`http://localhost:${instance.server.address().port}`)
3733
await target.close()
38-
await got(`http://localhost:${instance.server.address().port}`, {
39-
rejectUnauthorized: false
40-
})
34+
await got(`http://localhost:${instance.server.address().port}`)
4135
} catch (err) {
4236
t.equal(err.response.statusCode, 503)
4337
t.match(err.response.headers['content-type'], /application\/json/)

0 commit comments

Comments
 (0)