|
86 | 86 | }); |
87 | 87 | }); |
88 | 88 |
|
| 89 | + describe("from array", function() { |
| 90 | + it("[1,2,3]", function () { |
| 91 | + var c = new Color([1,2,3]); |
| 92 | + assertColor(c, 1, 2, 3, null); |
| 93 | + expect(c.isTransparent()).to.equal(false); |
| 94 | + }); |
| 95 | + |
| 96 | + it("[5,6,7,1]", function () { |
| 97 | + var c = new Color([5,6,7, 1]); |
| 98 | + assertColor(c, 5, 6, 7, 1); |
| 99 | + expect(c.isTransparent()).to.equal(false); |
| 100 | + }); |
| 101 | + |
| 102 | + it("[5,6,7,0]", function () { |
| 103 | + var c = new Color([5,6,7, 0]); |
| 104 | + assertColor(c, 5, 6, 7, 0); |
| 105 | + expect(c.isTransparent()).to.equal(true); |
| 106 | + }); |
| 107 | + }); |
| 108 | + |
89 | 109 | describe("transparency", function() { |
90 | 110 | it("transparent", function () { |
91 | 111 | var c = new Color("transparent"); |
|
0 commit comments