From ba9758cf1464095af8560d2085241808f09fc0e9 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Sun, 18 Oct 2015 23:57:55 +0300 Subject: [PATCH] Reformat mocha text shadow test names --- tests/mocha/css.js | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) 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'); + } } - } + }); }); });