File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -37,18 +37,23 @@ test('Tap all keys.', function(t)
3737// This test won't fail if there's an issue, but it will help you identify an issue if ran locally.
3838test ( 'Tap all numpad keys.' , function ( t )
3939{
40- if ( os . platform ( ) === 'linux' )
41- {
42- t . skip ( "No numpad keycodes on Linux." ) ;
43- t . end ( ) ;
44- }
45-
46- var nums = '0123456789' . split ( '' ) ;
47-
48- for ( var x in nums )
49- {
50- t . ok ( robot . keyTap ( 'numpad_' + nums [ x ] ) , 'tap ' + 'numpad_' + nums [ x ] + '.' ) ;
51- }
40+ var nums = '0123456789' . split ( '' ) ;
41+
42+ for ( var x in nums )
43+ {
44+ if ( os . platform ( ) === 'linux' )
45+ {
46+ /* jshint loopfunc:true */
47+ t . throws ( function ( )
48+ {
49+ robot . keyTap ( 'numpad_' + nums [ x ] ) ;
50+ } , / I n v a l i d k e y c o d e / , 'tap ' + 'numpad_' + nums [ x ] + ' threw an error.' ) ;
51+ }
52+ else
53+ {
54+ t . ok ( robot . keyTap ( 'numpad_' + nums [ x ] ) , 'tap ' + 'numpad_' + nums [ x ] + '.' ) ;
55+ }
56+ }
5257
5358 t . end ( ) ;
5459} ) ;
You can’t perform that action at this time.
0 commit comments