Skip to content

Commit 1f4cf36

Browse files
committed
fix: test and sync version
1 parent bebd4e6 commit 1f4cf36

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

fastify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const VERSION = '4.28.1'
3+
const VERSION = '4.29.0'
44

55
const Avvio = require('avvio')
66
const http = require('node:http')

test/schema-validation.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,8 +1380,8 @@ test('Schema validation will not be bypass by different content type', async t =
13801380
},
13811381
body: { invalid: 'string' }
13821382
})
1383-
t.equal(invalid1.statusCode, 400)
1384-
t.equal(invalid1.json().code, 'FST_ERR_VALIDATION')
1383+
t.equal(invalid1.statusCode, 415)
1384+
t.equal(invalid1.json().code, 'FST_ERR_CTP_INVALID_MEDIA_TYPE')
13851385

13861386
const invalid2 = await fastify.inject({
13871387
method: 'POST',
@@ -1391,8 +1391,8 @@ test('Schema validation will not be bypass by different content type', async t =
13911391
},
13921392
body: { invalid: 'string' }
13931393
})
1394-
t.equal(invalid2.statusCode, 400)
1395-
t.equal(invalid2.json().code, 'FST_ERR_VALIDATION')
1394+
t.equal(invalid2.statusCode, 415)
1395+
t.equal(invalid2.json().code, 'FST_ERR_CTP_INVALID_MEDIA_TYPE')
13961396

13971397
const invalid3 = await fastify.inject({
13981398
method: 'POST',
@@ -1402,6 +1402,6 @@ test('Schema validation will not be bypass by different content type', async t =
14021402
},
14031403
body: { invalid: 'string' }
14041404
})
1405-
t.equal(invalid3.statusCode, 400)
1406-
t.equal(invalid3.json().code, 'FST_ERR_VALIDATION')
1405+
t.equal(invalid3.statusCode, 415)
1406+
t.equal(invalid3.json().code, 'FST_ERR_CTP_INVALID_MEDIA_TYPE')
14071407
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy