File tree 1 file changed +17
-12
lines changed
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)
37
37
// This test won't fail if there's an issue, but it will help you identify an issue if ran locally.
38
38
test ( 'Tap all numpad keys.' , function ( t )
39
39
{
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
+ }
52
57
53
58
t . end ( ) ;
54
59
} ) ;
You can’t perform that action at this time.
0 commit comments