tests: validator: add support for customElement compile option + test cases (#4133)

pull/4154/head
David Kondrad 5 years ago committed by Conduitry
parent abe88f3b3a
commit 6b5a4870df

@ -27,7 +27,8 @@ describe("validate", () => {
const { warnings } = svelte.compile(input, {
dev: config.dev,
legacy: config.legacy,
generate: false
generate: false,
customElement: config.customElement
});
assert.deepEqual(warnings.map(w => ({

@ -0,0 +1,15 @@
[{
"code": "missing-custom-element-compile-options",
"message": "The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?",
"start": {
"line": 1,
"column": 16,
"character": 16
},
"end": {
"line": 1,
"column": 36,
"character": 36
},
"pos": 16
}]

@ -0,0 +1,3 @@
export default {
customElement: true
};
Loading…
Cancel
Save