From c88278079c735a99569bee57d9e33c63fab21464 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Nov 2017 09:30:55 -0500 Subject: [PATCH] test for missing options.name --- test/formats/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/formats/index.js b/test/formats/index.js index e4f3b41271..feab448c6c 100644 --- a/test/formats/index.js +++ b/test/formats/index.js @@ -157,6 +157,14 @@ describe("formats", () => { return testIife(code, "Foo", { answer: 42 }, `
42
`); }); + + it('requires options.name', () => { + assert.throws(() => { + svelte.compile('', { + format: 'iife' + }); + }, /Missing required 'name' option for IIFE export/); + }); }); describe("umd", () => {