Commit dbee44f 1 parent e5bfaf3 commit dbee44f Copy full SHA for dbee44f
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -131,20 +131,20 @@ const register = require('../lib/npm-event')
131
131
payload : reqPayload
132
132
} )
133
133
t . true ( ( payloadSize > 1024 * 1024 * 1 ) , 'payload is bigger then 1MB' )
134
- t . true ( ( payloadSize < 1024 * 1024 * 25 ) , 'payload is smaller then 25MB ' )
134
+ t . true ( ( payloadSize < 1024 * 1024 * 100 ) , 'payload is smaller then 100MB ' )
135
135
t . is ( statusCode , 202 , 'statusCode' )
136
136
t . end ( )
137
137
} )
138
138
139
139
tap . test ( 'does not accept packages that are bigger then 25MB' , async ( t ) => {
140
- const bigBody = Buffer . alloc ( 1024 * 1024 * 5 ) . toString ( )
140
+ const bigBody = Buffer . alloc ( 1024 * 1024 * 5 * 4 ) . toString ( )
141
141
const reqPayload = JSON . stringify ( {
142
142
payload : {
143
143
body : bigBody
144
144
}
145
145
} )
146
146
// Because of the JSON.stringify() the payload with the 5MB Buffer actually
147
- // has a size of ~30MB
147
+ // has a size of ~30MB * 4 ~= 120MB
148
148
const payloadSize = reqPayload . length
149
149
150
150
server . register ( {
@@ -172,7 +172,7 @@ const register = require('../lib/npm-event')
172
172
payload : reqPayload
173
173
} )
174
174
175
- t . true ( ( payloadSize > 1024 * 1024 * 25 ) , 'payload is bigger then 25MB ' )
175
+ t . true ( ( payloadSize > 1024 * 1024 * 100 ) , 'payload is bigger then 100MB ' )
176
176
t . is ( statusCode , 413 , 'statusCode' )
177
177
t . end ( )
178
178
} )
You can’t perform that action at this time.
0 commit comments