Skip to content

Commit

Permalink
update mixins test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgallen23 committed Jan 4, 2018
1 parent 50fea14 commit f4f53ef
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion css.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class CSSTask extends TaskKitTask {
}

// load mixins:
let globalMixins;
let globalMixins = {};
if (config.globalMixins) {
try {
globalMixins = require('require-all')({
Expand Down
11 changes: 8 additions & 3 deletions test/expected/mixins.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions test/fixtures/mixins.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.link {
@mixin test red, white;
background: black;
@mixin test-mixin red;
}
@mixin link-color red, blue;
}

.bg {
@mixin bg-color red;
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@define-mixin test $color, $hoverColor {
@define-mixin link-color $color, $hoverColor {
color: $color;
@mixin-content;

&:hover {
color: $hoverColor;
}
}
}
3 changes: 2 additions & 1 deletion test/local-mixins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const utils = require('./utils');

tap.test('generates local mixins', (t) => {
const css = new ClientKitCss('local mixins', {
mixinPath: 'test/fixtures/mixins/*',
assetPath: `${__dirname}/fixtures`,
mixinPath: 'test/fixtures/mixins/*.css',
files: {
'test/out/mixins.css': 'test/fixtures/mixins.css'
}
Expand Down

0 comments on commit f4f53ef

Please sign in to comment.