File tree 3 files changed +9
-2
lines changed
dev-packages/node-integration-tests/utils
packages/remix/test/integration
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,12 @@ async function makeRequest(
118
118
await axios . post ( url , axiosConfig ) ;
119
119
}
120
120
} catch ( e ) {
121
- // We sometimes expect the request to fail, but not the test.
122
- // So, we do nothing.
121
+ // We sometimes expect the request to fail, but not the test, so we are just logging the error.
122
+ // Beware though! There are also framework specific errors, e.g. fastify can give a 415 with
123
+ // FST_ERR_CTP_INVALID_MEDIA_TYPE if handling of application/x-www-form-urlencoded is not configure
124
+ // properly when building a test application / server. Errors of these kind can lead to requests
125
+ // not actually hitting the handler, and so no tracing will be happenning. This in its turn will
126
+ // most like make the test time out.
123
127
logger . warn ( e ) ;
124
128
}
125
129
}
Original file line number Diff line number Diff line change 7
7
"start" : " remix-serve build"
8
8
},
9
9
"dependencies" : {
10
+ "@fastify/formbody" : " ^7.4.0" ,
10
11
"@mcansh/remix-fastify" : " ^3.2.2" ,
11
12
"@remix-run/express" : " 1.17.0" ,
12
13
"@remix-run/node" : " 1.17.0" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { createRequestHandler as createExpressRequestHandler } from '@remix-run/
5
5
import { wrapExpressCreateRequestHandler , wrapFastifyCreateRequestHandler } from '@sentry/remix' ;
6
6
import express from 'express' ;
7
7
import fastify from 'fastify' ;
8
+ import formBody from '@fastify/formbody'
8
9
9
10
import { TestEnv } from '../../../../../../../dev-packages/node-integration-tests/utils' ;
10
11
@@ -32,6 +33,7 @@ const runExpressApp = (adapter: Adapter.Builtin | Adapter.Express): Promise<http
32
33
33
34
const runFastifyApp = ( ) : Promise < http . Server > => new Promise ( res => {
34
35
const app = fastify ( ) ;
36
+ app . register ( formBody ) ;
35
37
// @ts -ignore
36
38
app . all ( '*' , adapters [ Adapter . Fastify ] ( { build : require ( '../../../build' ) } ) ) ;
37
39
app . listen ( { port : 0 } , ( _err , _addr ) => {
You can’t perform that action at this time.
0 commit comments