Skip to content

Commit f07cb3d

Browse files
committed
add test for at-rule-descriptor-no-unknown
1 parent f08f592 commit f07cb3d

File tree

1 file changed

+49
-0
lines changed
  • lib/rules/at-rule-descriptor-no-unknown/__tests__

1 file changed

+49
-0
lines changed

lib/rules/at-rule-descriptor-no-unknown/__tests__/index.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import rule from '../index.mjs';
2+
import { stripIndent } from 'common-tags';
3+
24
const { messages, ruleName } = rule;
35

46
testRule({
@@ -153,5 +155,52 @@ testRule({
153155
},
154156
],
155157
},
158+
{
159+
code: stripIndent`
160+
@mixin --qux-baz(@contents) {
161+
@supports (overflow-anchor: auto) {
162+
@contents;
163+
}
164+
}
165+
166+
body {
167+
@apply --qux-baz {
168+
@font-face {
169+
foo: normal;
170+
}
171+
}
172+
}
173+
`,
174+
message: messages.rejected('@font-face', 'foo'),
175+
line: 10,
176+
column: 5,
177+
endLine: 10,
178+
endColumn: 8,
179+
description: 'without indirection',
180+
},
181+
{
182+
code: stripIndent`
183+
@mixin --qux-baz(@contents) {
184+
@supports (overflow-anchor: auto) {
185+
@font-face {
186+
@contents;
187+
}
188+
}
189+
}
190+
191+
body {
192+
@apply --qux-baz {
193+
foo: normal;
194+
}
195+
}
196+
`,
197+
message: messages.rejected('@font-face', 'foo'),
198+
line: 11,
199+
column: 3,
200+
endLine: 11,
201+
endColumn: 6,
202+
description: 'with indirection',
203+
skip: true,
204+
},
156205
],
157206
});

0 commit comments

Comments
 (0)