File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,6 +195,13 @@ describe('GET /api/streak', () => {
195195 // "5" doesn't match /^\d+(\.\d+)?s$/, so the default kicks in.
196196 expect ( body ) . toContain ( '8s' ) ;
197197 } ) ;
198+
199+ it ( 'falls back to 8s when speed=10 is provided' , async ( ) => {
200+ const response = await GET ( makeRequest ( { user : 'octocat' , speed : '10' } ) ) ;
201+ const body = await response . text ( ) ;
202+
203+ expect ( body ) . toContain ( '8s' ) ;
204+ } ) ;
198205 } ) ;
199206
200207 describe ( 'scale parameter' , ( ) => {
@@ -211,6 +218,12 @@ describe('GET /api/streak', () => {
211218
212219 expect ( response . status ) . toBe ( 200 ) ;
213220 } ) ;
221+
222+ it ( 'defaults to linear scale when scale=foo is given' , async ( ) => {
223+ const response = await GET ( makeRequest ( { user : 'octocat' , scale : 'foo' } ) ) ;
224+
225+ expect ( response . status ) . toBe ( 200 ) ;
226+ } ) ;
214227 } ) ;
215228
216229 describe ( 'theme parameter' , ( ) => {
You can’t perform that action at this time.
0 commit comments