mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Reformat mocha text shadow test names
This commit is contained in:
parent
083673daef
commit
b5df5580f7
@ -67,26 +67,28 @@ describe('Text-shadow', function() {
|
|||||||
var index = i + 1;
|
var index = i + 1;
|
||||||
var container = new NodeContainer(node, null);
|
var container = new NodeContainer(node, null);
|
||||||
var shadows = container.parseTextShadows();
|
var shadows = container.parseTextShadows();
|
||||||
if (i === 0) {
|
it(node.style.textShadow, function() {
|
||||||
expect(shadows.length).to.equal(0);
|
if (i === 0) {
|
||||||
} else {
|
expect(shadows.length).to.equal(0);
|
||||||
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 {
|
} else {
|
||||||
var opacity = '0.2';
|
expect(shadows.length).to.equal(i >= 6 ? 2 : 1);
|
||||||
expect(shadows[0].color.toString()).to.match(/rgba\(2,2,2,(0.2|0\.199219)\)/);
|
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
|
// only testing blur once
|
||||||
if (i === 1) {
|
if (i === 1) {
|
||||||
expect(shadows[0].blur).to.equal('1');
|
expect(shadows[0].blur).to.equal('1');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user