From ee4efd5248bc1219e8595ac2776e33e327a71f21 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Wed, 18 May 2016 20:22:42 +1000 Subject: [PATCH] Add tests for box-sizing mixin Closes #60 --- test/css3/boxSizingSpec.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/css3/boxSizingSpec.js diff --git a/test/css3/boxSizingSpec.js b/test/css3/boxSizingSpec.js new file mode 100644 index 0000000..8d0d8ec --- /dev/null +++ b/test/css3/boxSizingSpec.js @@ -0,0 +1,37 @@ +var render = require('../helper/render'); +var ruleset = require('../helper/ruleset'); + +describe("CSS3 Boz Sizing", function () { + + describe("CSS3 an argument", function () { + + it("should generate a box-size property", function (done) { + render(ruleset('$experimental-support-for-mozilla: false !global; $experimental-support-for-opera: false !global; @include box-sizing(border-box)'), function(output, err) { + expect(output).toBe(ruleset('-webkit-box-sizing:border-box;box-sizing:border-box')); + done(); + }, ['compass/css3/box-sizing']); + }); + + }); + + describe("CSS3 an empty argument", function () { + describe("in a ruleset without other properties", function () { + it("should generate nothing", function (done) { + render(ruleset('$experimental-support-for-mozilla: false !global; $experimental-support-for-opera: false !global; @include box-sizing("")'), function(output, err) { + expect(output).toBe(''); + done(); + }, ['compass/css3/box-sizing']); + }); + }); + + describe("in a ruleset with other properties", function () { + it("should generate the other properties", function (done) { + render(ruleset('$experimental-support-for-mozilla: false !global; $experimental-support-for-opera: false !global; foo: bar; @include box-sizing("")'), function(output, err) { + expect(output).toBe(ruleset('foo:bar')); + done(); + }, ['compass/css3/box-sizing']); + }); + }); + }); + +});