Skip to content

Commit 7fd26b0

Browse files
committed
refactor(plugin-axe): use AxePreset type for test cases
1 parent 7551b3b commit 7fd26b0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/plugin-axe/src/lib/meta/audits.unit.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { describe, expect, it } from 'vitest';
2+
import type { AxePreset } from '../constants.js';
23
import { loadAxeRules, transformRulesToAudits } from './transform.js';
34

45
describe('transformRulesToAudits', () => {
5-
it.each([
6-
['wcag21aa' as const, 65, 70],
7-
['wcag22aa' as const, 66, 72],
8-
['best-practice' as const, 25, 35],
9-
['all' as const, 100, 110],
6+
it.each<[AxePreset, number, number]>([
7+
['wcag21aa', 65, 70],
8+
['wcag22aa', 66, 72],
9+
['best-practice', 25, 35],
10+
['all', 100, 110],
1011
])(
1112
'should transform %j preset rules into audits within expected range',
1213
(preset, min, max) => {

0 commit comments

Comments
 (0)