@@ -260,23 +260,23 @@ describe('GET /api/streak', () => {
260260 const body = await response . json ( ) ;
261261
262262 expect ( response . status ) . toBe ( 400 ) ;
263- expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'Invalid "year" parameter ' ) ;
263+ expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'GitHub was founded in 2008 ' ) ;
264264 } ) ;
265265
266266 it ( 'returns 400 for malformed numeric year' , async ( ) => {
267267 const response = await GET ( makeRequest ( { user : 'octocat' , year : '100000' } ) ) ;
268268 const body = await response . json ( ) ;
269269
270270 expect ( response . status ) . toBe ( 400 ) ;
271- expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'Invalid "year" parameter ' ) ;
271+ expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'GitHub was founded in 2008 ' ) ;
272272 } ) ;
273273
274274 it ( 'returns 400 for years before GitHub existed' , async ( ) => {
275275 const response = await GET ( makeRequest ( { user : 'octocat' , year : '1999' } ) ) ;
276276 const body = await response . json ( ) ;
277277
278278 expect ( response . status ) . toBe ( 400 ) ;
279- expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'Invalid "year" parameter ' ) ;
279+ expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'GitHub was founded in 2008 ' ) ;
280280 } ) ;
281281
282282 it ( 'returns 400 for future years' , async ( ) => {
@@ -286,7 +286,7 @@ describe('GET /api/streak', () => {
286286 const body = await response . json ( ) ;
287287
288288 expect ( response . status ) . toBe ( 400 ) ;
289- expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'Invalid "year" parameter ' ) ;
289+ expect ( body . details . fieldErrors . year [ 0 ] ) . toContain ( 'GitHub was founded in 2008 ' ) ;
290290 } ) ;
291291 } ) ;
292292
0 commit comments