Skip to content

Commit a641236

Browse files
committed
test(plugin-eslint): enhance group validation test
1 parent e392533 commit a641236

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

packages/plugin-eslint/src/lib/meta/groups.unit.test.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,22 @@ describe('groupsFromCustomConfig', () => {
288288
});
289289

290290
it('should log a warning when some of custom group rules are invalid', () => {
291-
groupsFromCustomConfig(eslintRules, [
291+
expect(
292+
groupsFromCustomConfig(eslintRules, [
293+
{
294+
slug: 'custom-group',
295+
title: 'Custom Group',
296+
rules: {
297+
'react/jsx-key': 3,
298+
'invalid-rule': 3,
299+
},
300+
},
301+
]),
302+
).toEqual<Group[]>([
292303
{
293304
slug: 'custom-group',
294305
title: 'Custom Group',
295-
rules: {
296-
'react/jsx-key': 3,
297-
'invalid-rule': 3,
298-
},
306+
refs: [{ slug: 'react-jsx-key', weight: 3 }],
299307
},
300308
]);
301309
expect(ui()).toHaveLogged(

0 commit comments

Comments
 (0)