Skip to content

Commit

Permalink
issue-#72 - Cleaned up sass variables extraction test/example.
Browse files Browse the repository at this point in the history
- Updated package version.
  • Loading branch information
elycruz committed Sep 17, 2022
1 parent 17031fb commit 3612779
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion 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",
Expand Down
2 changes: 1 addition & 1 deletion test/assets/expect_a--with-icss-exports.css
@@ -1 +1 @@
body{color:red;background:blue;}
body{color:red;background:blue}
21 changes: 8 additions & 13 deletions test/index.test.ts
Expand Up @@ -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 => {
Expand Down Expand Up @@ -482,6 +477,6 @@ test('When `sourcemap` is set, to `true`, adjacent source map file should be out
});

test.after(async (): Promise<any> => {
// return fs.rmdir(tmpDir, {recursive: true})
// .catch(error);
return fs.rmdir(tmpDir, {recursive: true})
.catch(error);
});

0 comments on commit 3612779

Please sign in to comment.