Skip to content

Commit 6b37a2b

Browse files
committed
test(template-require-iframe-title): absorb audit-fixture cases, drop audit fixture
Upstream maintainers don't want the per-PR `tests/audit/peer-parity` pattern — it's conceptual overhead for a narrow BUGFIX, requires a parallel vitest config to keep out of the default suite, and reads as documentation rather than executable coverage. Port the one assertion from the iframe-title audit fixture that wasn't already covered by the regular suite — `<iframe title={{""}} />` as a documented under-flag — into the regular test file with an inline comment explaining the divergence. All other audit cases were either already covered or pure peer-plugin restatements without unique signal. Drop: - `tests/audit/iframe-title/peer-parity.js` - `tests/audit/vitest.audit.config.mjs` (the parallel config) - `tests/audit/**` exclusion in `vitest.config.mjs` - `test:audit` script in `package.json` Diff vs origin/master is now purely the rule fix, rule tests, and docs.
1 parent e0e37f7 commit 6b37a2b

5 files changed

Lines changed: 8 additions & 243 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"lint:remote": "eslint-remote-tester",
5757
"start": "pnpm test:watch",
5858
"test": "vitest run",
59-
"test:audit": "vitest run --config=tests/audit/vitest.audit.config.mjs",
6059
"test:coverage": "vitest --coverage",
6160
"test:watch": "vitest",
6261
"update": "node ./scripts/update-rules.js && node ./scripts/list-jquery-methods.js && npm-run-all update:eslint-docs",

tests/audit/iframe-title/peer-parity.js

Lines changed: 0 additions & 218 deletions
This file was deleted.

tests/audit/vitest.audit.config.mjs

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/lib/rules/template-require-iframe-title.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ ruleTester.run('template-require-iframe-title', rule, {
1717
'<template><iframe title={{someValue}} /></template>',
1818
'<template><iframe title="" aria-hidden /></template>',
1919
'<template><iframe title="" hidden /></template>',
20+
// Documented divergence — `title={{""}}` is not flagged. jsx-a11y catches
21+
// empty-string literals via getLiteralPropValue; our rule inspects only
22+
// the named literal AST nodes (Boolean / Null / Undefined / Number) and
23+
// an empty-string mustache parses as a concat-of-nothing rather than a
24+
// GlimmerStringLiteral, so the under-flag is structural rather than
25+
// policy. Pinning the current behavior so any change is intentional.
26+
'<template><iframe title={{""}} /></template>',
2027
'<template><iframe title="foo" /><iframe title="bar" /></template>',
2128
// allowWhitespaceOnlyTitle: true — whitespace-only accepted.
2229
{

vitest.config.mjs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@ export default defineConfig({
55
globals: true,
66
setupFiles: [],
77
include: ['**/tests/**/*.js'],
8-
exclude: [
9-
'tests/helpers/**',
10-
'tests/bench/**',
11-
'tests/fixtures/**',
12-
// Audit fixtures are opt-in regression records — translate peer-plugin
13-
// test cases to pin our CURRENT behavior / capture divergences. They
14-
// live outside the default test run so the suite stays focused on the
15-
// rule-level tests. Run them explicitly via:
16-
// pnpm exec vitest run tests/audit/**/*.js
17-
'tests/audit/**',
18-
'node_modules',
19-
],
8+
exclude: ['tests/helpers/**', 'tests/bench/**', 'tests/fixtures/**', 'node_modules'],
209
sequence: {
2110
hooks: 'list',
2211
},

0 commit comments

Comments
 (0)