From 64191be80788970fd88526713f54a2f99550c84d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Nov 2017 09:32:00 -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 feab448c6c..8028a7e4ab 100644 --- a/test/formats/index.js +++ b/test/formats/index.js @@ -198,6 +198,14 @@ describe("formats", () => { testCjs(code, { answer: 42 }, `
42
`); testIife(code, "Foo", { answer: 42 }, `
42
`); }); + + it('requires options.name', () => { + assert.throws(() => { + svelte.compile('', { + format: 'umd' + }); + }, /Missing required 'name' option for UMD export/); + }); }); describe("eval", () => {