From e4e4a8d8c2571899bd2bcfd340a8caf788d723e0 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 28 Oct 2018 21:43:02 -0400 Subject: [PATCH] add test --- test/preprocess/index.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/preprocess/index.js b/test/preprocess/index.js index 044f6965e6..1a636b8588 100644 --- a/test/preprocess/index.js +++ b/test/preprocess/index.js @@ -110,6 +110,42 @@ describe('preprocess', () => { }); }); + it('preprocesses multiple matching tags', () => { + const source = ` + + + + `; + + const expected = ` + + + + `; + + return svelte.preprocess(source, { + script: ({ content }) => { + return { + code: content.toLowerCase() + }; + } + }).then(processed => { + assert.equal(processed.toString(), expected); + }); + }); + it('parses attributes', () => { const source = `