@@ -28,7 +28,7 @@ describe('utils', () => {
28
28
] . forEach ( noRuleCase => {
29
29
it ( `returns null for ${ noRuleCase } ` , ( ) => {
30
30
const ast = espree . parse ( noRuleCase , { ecmaVersion : 8 , range : true } ) ;
31
- assert . isNull ( utils . getRuleInfo ( ast ) , 'Expected no rule to be found' ) ;
31
+ assert . isNull ( utils . getRuleInfo ( { ast } ) , 'Expected no rule to be found' ) ;
32
32
} ) ;
33
33
} ) ;
34
34
} ) ;
@@ -115,7 +115,7 @@ describe('utils', () => {
115
115
Object . keys ( CASES ) . forEach ( ruleSource => {
116
116
it ( ruleSource , ( ) => {
117
117
const ast = espree . parse ( ruleSource , { ecmaVersion : 6 , range : true } ) ;
118
- const ruleInfo = utils . getRuleInfo ( ast ) ;
118
+ const ruleInfo = utils . getRuleInfo ( { ast } ) ;
119
119
assert (
120
120
lodash . isMatch ( ruleInfo , CASES [ ruleSource ] ) ,
121
121
`Expected \n${ util . inspect ( ruleInfo ) } \nto match\n${ util . inspect ( CASES [ ruleSource ] ) } `
@@ -139,8 +139,8 @@ describe('utils', () => {
139
139
isNewStyle : true ,
140
140
} ;
141
141
it ( `ScopeOptions: ${ JSON . stringify ( scopeOptions ) } ` , ( ) => {
142
- const scope = eslintScope . analyze ( ast , scopeOptions ) ;
143
- const ruleInfo = utils . getRuleInfo ( ast , scope ) ;
142
+ const scopeManager = eslintScope . analyze ( ast , scopeOptions ) ;
143
+ const ruleInfo = utils . getRuleInfo ( { ast, scopeManager } ) ;
144
144
assert (
145
145
lodash . isMatch ( ruleInfo , expected ) ,
146
146
`Expected \n${ util . inspect ( ruleInfo ) } \nto match\n${ util . inspect ( expected ) } `
0 commit comments