tests for compiler errors

pull/11276/head
Rich Harris 2 years ago
parent 757c4541f4
commit 94534c0262

@ -0,0 +1,9 @@
import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-combinator',
message: 'A :global {...} block cannot follow a > combinator',
position: [12, 21]
}
});

@ -0,0 +1,9 @@
import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-declaration',
message: 'A :global {...} block can only contain rules, not declarations',
position: [24, 34]
}
});

@ -0,0 +1,9 @@
import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-modifier',
message: 'A :global {...} block cannot modify an existing selector',
position: [14, 21]
}
});

@ -0,0 +1,9 @@
import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-list',
message: 'A :global {...} block cannot be part of a selector list with more than one item',
position: [9, 31]
}
});

@ -1,9 +0,0 @@
import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-selector',
message: ':global(...) must contain exactly one selector',
position: [16, 16]
}
});
Loading…
Cancel
Save