@@ -9,7 +9,7 @@ const rule = require('../../../lib/rules/no-force')
9
9
const RuleTester = require ( 'eslint' ) . RuleTester
10
10
11
11
const errors = [ { messageId : 'unexpected' } ]
12
- const parserOptions = { ecmaVersion : 6 }
12
+ const parserOptions = { ecmaVersion : 2018 }
13
13
14
14
//------------------------------------------------------------------------------
15
15
// Tests
@@ -24,12 +24,13 @@ ruleTester.run('no-force', rule, {
24
24
{ code : `cy.get('button').click({multiple: true})` , parserOptions } ,
25
25
{ code : `cy.get('button').dblclick()` , parserOptions } ,
26
26
{ code : `cy.get('input').type('somth')` , parserOptions } ,
27
- { code : `cy.get('input').type('somth', {anyoption: true})` , parserOptions, errors } ,
28
- { code : `cy.get('input').trigger('click', {anyoption: true})` , parserOptions, errors } ,
29
- { code : `cy.get('input').rightclick({anyoption: true})` , parserOptions, errors } ,
30
- { code : `cy.get('input').check()` , parserOptions, errors } ,
31
- { code : `cy.get('input').select()` , parserOptions, errors } ,
32
- { code : `cy.get('input').focus()` , parserOptions, errors } ,
27
+ { code : `cy.get('input').type('somth', {anyoption: true})` , parserOptions } ,
28
+ { code : `cy.get('input').trigger('click', {anyoption: true})` , parserOptions } ,
29
+ { code : `cy.get('input').rightclick({anyoption: true})` , parserOptions } ,
30
+ { code : `cy.get('input').check()` , parserOptions } ,
31
+ { code : `cy.get('input').select()` , parserOptions } ,
32
+ { code : `cy.get('input').focus()` , parserOptions } ,
33
+ { code : `cy.document().trigger("keydown", { ...event })` , parserOptions } ,
33
34
] ,
34
35
35
36
invalid : [
0 commit comments