File: fix-failing-test.patch

package info (click to toggle)
html2canvas 0.5.0~beta4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 920 kB
  • ctags: 416
  • sloc: makefile: 52
file content (18 lines) | stat: -rw-r--r-- 873 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix failing tests
 Loosen the test for "text-shadow: 1px 1px 1px"
 phantomjs on Debian GNU/Linux gives a slightly different but equivalent result
Author: Ximin Luo <infinity0@debian.org>
Bug: https://github.com/niklasvh/html2canvas/pull/1002
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/tests/mocha/css.js
+++ b/tests/mocha/css.js
@@ -75,7 +75,7 @@
                 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)');
+                    expect(['rgb(0,0,0)', 'rgba(0,0,0,0)']).to.contain(shadows[0].color.toString());
                 } else if (i % 2 === 0) {
                     expect(shadows[0].color.toString()).to.equal('rgb(2,2,2)');
                 } else {