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
aa05241ff8
commit
ba9758cf14
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user