@@ -9,7 +9,7 @@ const rule = require('../../../lib/rules/no-force')
99const RuleTester = require ( 'eslint' ) . RuleTester
1010
1111const errors = [ { messageId : 'unexpected' } ]
12- const parserOptions = { ecmaVersion : 6 }
12+ const parserOptions = { ecmaVersion : 2018 }
1313
1414//------------------------------------------------------------------------------
1515// Tests
@@ -24,12 +24,13 @@ ruleTester.run('no-force', rule, {
2424 { code : `cy.get('button').click({multiple: true})` , parserOptions } ,
2525 { code : `cy.get('button').dblclick()` , parserOptions } ,
2626 { 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 } ,
3334 ] ,
3435
3536 invalid : [
0 commit comments