File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -65,19 +65,16 @@ describe('package', () => {
65
65
}
66
66
67
67
// Strict configuration always includes all recommended rules.
68
- expect ( plugin . configs . strict . rules ) . toHaveProperty ( fullRuleName ) ;
69
- // Not allowed to specify non-default options if rule only specifies a configuration name.
70
- expect ( typeof plugin . configs . strict . rules [ fullRuleName as keyof typeof plugin . configs . strict . rules ] ) . toBe ( 'string' ) ;
68
+ // Not allowed to specify non-default options since rule only specifies a configuration name.
69
+ expect ( plugin . configs . strict . rules ) . toHaveProperty ( fullRuleName , expect . any ( String ) ) ;
71
70
} else {
72
71
// Rule specifies non-default options for strict.
73
72
if ( rule . meta . docs . recommended . recommended ) {
74
73
expect ( plugin . configs . recommended . rules ) . toHaveProperty ( fullRuleName ) ;
75
74
} else {
76
75
expect ( plugin . configs . recommended . rules ) . not . toHaveProperty ( fullRuleName ) ;
77
76
}
78
- expect ( plugin . configs . strict . rules ) . toHaveProperty ( fullRuleName ) ;
79
- expect ( plugin . configs . strict . rules [ fullRuleName as keyof typeof plugin . configs . strict . rules ] ) . toBeInstanceOf ( Array ) ;
80
- expect ( plugin . configs . strict . rules [ fullRuleName as keyof typeof plugin . configs . strict . rules ] [ 1 ] ) . toEqual ( rule . meta . docs . recommended . strict [ 0 ] ) ;
77
+ expect ( plugin . configs . strict . rules ) . toHaveProperty ( fullRuleName , [ expect . any ( String ) , rule . meta . docs . recommended . strict [ 0 ] ] ) ;
81
78
}
82
79
} ) ;
83
80
} ) ;
You can’t perform that action at this time.
0 commit comments