Skip to content

Commit 4e321fc

Browse files
Sam Van Campenhoutjonathantneal
authored andcommitted
Update the tests
- Change extension of the source files to .scss. dart-sass throws compiler warnings when encountering css files which contain sass variables. - Split the postcss-import test into a separate source file - Update the .expect files. Dart Sass does not support a compact output and the source-map hashes are different, so the tests where failing.
1 parent 6d030af commit 4e321fc

15 files changed

+48
-22
lines changed

.tape.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = {
99
'postcss-sass': {
1010
'basic': {
1111
message: 'supports basic usage',
12-
processOptions: processOptions
12+
processOptions: processOptions,
13+
source: 'basic.scss'
1314
},
1415
'basic:sassopts': {
1516
message: 'supports sass options usage',
@@ -18,30 +19,34 @@ module.exports = {
1819
indentWidth: 1,
1920
outputStyle: 'expanded'
2021
},
21-
processOptions: processOptions
22+
processOptions: processOptions,
23+
source: 'basic.scss'
2224
},
2325
'basic:mixed': {
2426
message: 'supports mixed (postcss-unroot, postcss-sass) usage',
2527
plugin: () => require('postcss')(
2628
require('postcss-unroot'),
2729
require('.')
2830
),
29-
processOptions: processOptions
31+
processOptions: processOptions,
32+
source: 'basic.scss'
3033
},
3134
'imports': {
3235
message: 'supports imports usage',
3336
plugin: () => require('postcss')(
3437
require('.')
3538
),
36-
processOptions: processOptions
39+
processOptions: processOptions,
40+
source: 'imports.scss'
3741
},
38-
'imports:postcss': {
42+
'css-imports': {
3943
message: 'supports imports (postcss-import, postcss-sass) usage',
4044
plugin: () => require('postcss')(
4145
require('postcss-import'),
4246
require('.')
4347
),
44-
processOptions: processOptions
48+
processOptions: processOptions,
49+
source: 'css-imports.scss'
4550
}
4651
}
4752
};

test/basic.expect.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/basic.mixed.expect.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/basic.sassopts.expect.css

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/css-components/page.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:root {
2+
color: $primary-color;
3+
font: 100% $font-stack;
4+
}

test/css-components/vars.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$font-stack: Helvetica, sans-serif;
2+
$primary-color: #333;

test/css-imports.expect.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)