diff --git a/package.json b/package.json index 9e6059d..1ac6c66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-sass", - "version": "1.2.13", + "version": "1.2.14", "description": "Rollup Sass files.", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/test/assets/expect_a--with-icss-exports.css b/test/assets/expect_a--with-icss-exports.css index b491714..f480c91 100644 --- a/test/assets/expect_a--with-icss-exports.css +++ b/test/assets/expect_a--with-icss-exports.css @@ -1 +1 @@ -body{color:red;background:blue;} +body{color:red;background:blue} diff --git a/test/index.test.ts b/test/index.test.ts index 7bca199..2aa7fd1 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -299,24 +299,19 @@ test('should support processor return type `Promise<{css: string, icssExport: {} out = Object.assign({}, extractedIcss.icssExports, { css: cleanedCss, }); - console.table(extractedIcss); - console.log(out); + // console.table(extractedIcss); + // console.log(out); resolve(out); }), options: sassOptions, }), ], }), - {output} = await outputBundle.generate(generateOptions); - - outputBundle.write({ - ...generateOptions, - file: path.join(tmpDir, 'with--icss-exports.js'), - }); - // console.log('output:', output); + {output} = await outputBundle.generate(generateOptions), + rslt = squash(unwrap(output)); - t.true(squash(unwrap(output)).includes(expectA2)); - t.true(squash(unwrap(output)).includes(expectB)); + t.true(rslt.includes(expectA2)); + t.true(rslt.includes(expectB)); }); test('should processor throw error', async t => { @@ -482,6 +477,6 @@ test('When `sourcemap` is set, to `true`, adjacent source map file should be out }); test.after(async (): Promise => { - // return fs.rmdir(tmpDir, {recursive: true}) - // .catch(error); + return fs.rmdir(tmpDir, {recursive: true}) + .catch(error); });