Browse Source

Update for compatibility with latest node-sass

master
Wyatt Anderson 10 years ago
parent
commit
613d07b33f
  1. 2
      package.json
  2. 4
      test/css3/borderRadiusSpec.js
  3. 4
      test/css3/boxShadowSpec.js
  4. 10
      test/css3/imagesSpec.js
  5. 2
      test/css3/transitionSpec.js
  6. 2
      test/helper/property.js
  7. 4
      test/helper/render.js

2
package.json

@ -38,6 +38,6 @@
"devDependencies": {
"chalk": "^0.5.1",
"jasmine-node": "^1.14.5",
"node-sass": "^0.9.3"
"node-sass": "^2.0.0-beta"
}
}

4
test/css3/borderRadiusSpec.js

@ -4,8 +4,8 @@ var ruleset = require('../helper/ruleset');
describe("CSS3 Border Radius", function () {
it("should generate a border radius", function (done) {
render(ruleset('$experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include border-radius(0, 0);'), function(output, err) {
expect(output).toBe(ruleset('-webkit-border-radius:0 0;border-radius:0 / 0;'));
render(ruleset('$experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include border-radius(0, 0)'), function(output, err) {
expect(output).toBe(ruleset('-webkit-border-radius:0 0;border-radius:0 / 0'));
done();
}, ['compass/css3/border-radius']);
});

4
test/css3/boxShadowSpec.js

@ -4,8 +4,8 @@ var ruleset = require('../helper/ruleset');
describe("CSS3 Box Shadow", function () {
it("should generate a default box shadow", function (done) {
render(ruleset('$default-box-shadow-inset: inset; $default-box-shadow-h-offset: 23px; $default-box-shadow-v-offset: 24px; $default-box-shadow-blur: 17px; $default-box-shadow-spread: 15px; $default-box-shadow-color: #DEADBE; $experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include box-shadow;'), function(output, err) {
expect(output).toBe(ruleset('-webkit-box-shadow:inset 23px 24px 17px 15px #DEADBE;box-shadow:inset 23px 24px 17px 15px #DEADBE;'));
render(ruleset('$default-box-shadow-inset: inset; $default-box-shadow-h-offset: 23px; $default-box-shadow-v-offset: 24px; $default-box-shadow-blur: 17px; $default-box-shadow-spread: 15px; $default-box-shadow-color: #DEADBE; $experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include box-shadow'), function(output, err) {
expect(output).toBe(ruleset('-webkit-box-shadow:inset 23px 24px 17px 15px #DEADBE;box-shadow:inset 23px 24px 17px 15px #DEADBE'));
done();
}, ['compass/css3/box-shadow']);
});

10
test/css3/imagesSpec.js

@ -5,21 +5,21 @@ describe("CSS3 Images", function () {
it("should generate a background", function (done) {
render(ruleset('@include background(ok);'), function(output, err) {
expect(output).toBe(ruleset('background:-owg-ok;background:-webkit-ok;background:-moz-ok;background:-o-ok;background:ok;'));
expect(output).toBe(ruleset('background:-owg-ok;background:-webkit-ok;background:-moz-ok;background:-o-ok;background:ok'));
done();
}, ['compass/css3/images']);
});
it("should generate multiple backgrounds", function (done) {
render(ruleset('$support-for-original-webkit-gradients: false; $experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include background(a, b, c);'), function(output, err) {
expect(output).toBe(ruleset('background:-webkit-a,-webkit-b,-webkit-c;background:a,b,c;'));
render(ruleset('$support-for-original-webkit-gradients: false; $experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include background(a, b, c)'), function(output, err) {
expect(output).toBe(ruleset('background:-webkit-a,-webkit-b,-webkit-c;background:a,b,c'));
done();
}, ['compass/css3/images']);
});
it("should generate multiple backgrounds of different types", function (done) {
render(ruleset('$support-for-original-webkit-gradients: false; $experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include background(#fff, url(1.gif), linear-gradient(white, black));'), function(output, err) {
expect(output).toBe(ruleset('background:#fff,url(1.gif),-webkit-linear-gradient(#ffffff, #000000);background:#fff,url(1.gif),linear-gradient(#ffffff, #000000);'));
render(ruleset('$support-for-original-webkit-gradients: false; $experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include background(#fff, url(1.gif), linear-gradient(white, black))'), function(output, err) {
expect(output).toBe(ruleset('background:#fff,url(1.gif),-webkit-linear-gradient(white, black);background:#fff,url(1.gif),linear-gradient(white, black)'));
done();
}, ['compass/css3/images']);
});

2
test/css3/transitionSpec.js

@ -5,7 +5,7 @@ describe("CSS3 Transition", function () {
it("should generate a transition", function (done) {
render(ruleset('$experimental-support-for-mozilla: false; $experimental-support-for-opera: false; @include transition(ok 0s);'), function(output, err) {
expect(output).toBe(ruleset('-webkit-transition:ok 0s;transition:ok 0s;'));
expect(output).toBe(ruleset('-webkit-transition:ok 0s;transition:ok 0s'));
done();
}, ['compass/css3/transition']);
});

2
test/helper/property.js

@ -1,3 +1,3 @@
module.exports = function(prop) {
return 'a{b:'+prop+';}';
return 'a{b:'+prop+'}';
}

4
test/helper/render.js

@ -9,11 +9,11 @@ module.exports = function(data, callback, imports) {
data: '@import "'+libDir+'/compass/functions";' + imports.join('') + data,
outputStyle: 'compressed',
success: function(output){
callback(output);
callback(output.css);
},
error: function(err){
console.log(chalk.red("Sass error:"), err);
callback('', err);
}
});
}
}

Loading…
Cancel
Save