Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test for at-rule-descriptor-no-unknown
  • Loading branch information
Mouvedia committed Jun 28, 2025
commit f07cb3d018902f77d3e27379192dbda68d3ed50d
49 changes: 49 additions & 0 deletions lib/rules/at-rule-descriptor-no-unknown/__tests__/index.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import rule from '../index.mjs';
import { stripIndent } from 'common-tags';

const { messages, ruleName } = rule;

testRule({
Expand Down Expand Up @@ -153,5 +155,52 @@ testRule({
},
],
},
{
code: stripIndent`
@mixin --qux-baz(@contents) {
@supports (overflow-anchor: auto) {
@contents;
}
}

body {
@apply --qux-baz {
@font-face {
foo: normal;
}
}
}
`,
message: messages.rejected('@font-face', 'foo'),
line: 10,
column: 5,
endLine: 10,
endColumn: 8,
description: 'without indirection',
},
{
code: stripIndent`
@mixin --qux-baz(@contents) {
@supports (overflow-anchor: auto) {
@font-face {
@contents;
}
}
}

body {
@apply --qux-baz {
foo: normal;
}
}
Comment on lines +183 to +195
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`,
message: messages.rejected('@font-face', 'foo'),
line: 11,
column: 3,
endLine: 11,
endColumn: 6,
description: 'with indirection',
skip: true,
},
],
});