diff --git a/tests/mocha/css.js b/tests/mocha/css.js index 3124db9..885a4bc 100644 --- a/tests/mocha/css.js +++ b/tests/mocha/css.js @@ -67,26 +67,28 @@ describe('Text-shadow', function() { var index = i + 1; var container = new NodeContainer(node, null); var shadows = container.parseTextShadows(); - if (i === 0) { - expect(shadows.length).to.equal(0); - } else { - expect(shadows.length).to.equal(i >= 6 ? 2 : 1); - expect(shadows[0].offsetX).to.equal(i); - expect(shadows[0].offsetY).to.equal(i); - if (i < 2) { - expect(shadows[0].color.toString()).to.equal('rgba(0,0,0,0)'); - } else if (i % 2 === 0) { - expect(shadows[0].color.toString()).to.equal('rgb(2,2,2)'); + it(node.style.textShadow, function() { + if (i === 0) { + expect(shadows.length).to.equal(0); } else { - var opacity = '0.2'; - expect(shadows[0].color.toString()).to.match(/rgba\(2,2,2,(0.2|0\.199219)\)/); - } + expect(shadows.length).to.equal(i >= 6 ? 2 : 1); + expect(shadows[0].offsetX).to.equal(i); + expect(shadows[0].offsetY).to.equal(i); + if (i < 2) { + expect(shadows[0].color.toString()).to.equal('rgba(0,0,0,0)'); + } else if (i % 2 === 0) { + expect(shadows[0].color.toString()).to.equal('rgb(2,2,2)'); + } else { + var opacity = '0.2'; + expect(shadows[0].color.toString()).to.match(/rgba\(2,2,2,(0.2|0\.199219)\)/); + } - // only testing blur once - if (i === 1) { - expect(shadows[0].blur).to.equal('1'); + // only testing blur once + if (i === 1) { + expect(shadows[0].blur).to.equal('1'); + } } - } + }); }); });