test for missing options.name

pull/942/head
Rich Harris 8 years ago
parent 427aa7eb84
commit c88278079c

@ -157,6 +157,14 @@ describe("formats", () => {
return testIife(code, "Foo", { answer: 42 }, `<div>42</div>`); return testIife(code, "Foo", { answer: 42 }, `<div>42</div>`);
}); });
it('requires options.name', () => {
assert.throws(() => {
svelte.compile('', {
format: 'iife'
});
}, /Missing required 'name' option for IIFE export/);
});
}); });
describe("umd", () => { describe("umd", () => {

Loading…
Cancel
Save