File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,20 @@ export function init(
8383
8484 let sortableSlowWords : [ string , number ] [ ] = [ ] ;
8585 if ( slow ) {
86- sortableSlowWords = TestWords . words
86+ const typedWords = TestWords . words
8787 . get ( )
88- . map ( ( e , i ) => [ e , TestInput . burstHistory [ i ] ?? 0 ] ) ;
88+ . slice ( 0 , TestInput . input . getHistory ( ) . length - 1 ) ;
89+
90+ sortableSlowWords = typedWords . map ( ( e , i ) => [
91+ e ,
92+ TestInput . burstHistory [ i ] ?? 0 ,
93+ ] ) ;
8994 sortableSlowWords . sort ( ( a , b ) => {
9095 return a [ 1 ] - b [ 1 ] ;
9196 } ) ;
9297 sortableSlowWords = sortableSlowWords . slice (
9398 0 ,
94- Math . min ( limit , Math . round ( TestWords . words . length * 0.2 ) )
99+ Math . min ( limit , Math . round ( typedWords . length * 0.2 ) )
95100 ) ;
96101 if ( sortableSlowWords . length === 0 ) {
97102 Notifications . add ( "Test too short to classify slow words." , 0 ) ;
You can’t perform that action at this time.
0 commit comments