Reformat mocha text shadow test names

This commit is contained in:
Niklas von Hertzen 2015-10-18 23:57:55 +03:00
parent aa05241ff8
commit ba9758cf14

View File

@ -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');
}
}
}
});
});
});