()
| 2 | |
| 3 | // Helper: create a mock Game Object with Alpha mixin applied |
| 4 | function createGameObject () |
| 5 | { |
| 6 | var obj = { |
| 7 | _alpha: 1, |
| 8 | _alphaTL: 1, |
| 9 | _alphaTR: 1, |
| 10 | _alphaBL: 1, |
| 11 | _alphaBR: 1, |
| 12 | renderFlags: 15 // all flags set (0b1111) |
| 13 | }; |
| 14 | |
| 15 | // Copy plain methods |
| 16 | obj.clearAlpha = Alpha.clearAlpha; |
| 17 | obj.setAlpha = Alpha.setAlpha; |
| 18 | |
| 19 | // Apply getter/setter properties as actual accessors |
| 20 | Object.defineProperties(obj, { |
| 21 | alpha: Alpha.alpha, |
| 22 | alphaTopLeft: Alpha.alphaTopLeft, |
| 23 | alphaTopRight: Alpha.alphaTopRight, |
| 24 | alphaBottomLeft: Alpha.alphaBottomLeft, |
| 25 | alphaBottomRight: Alpha.alphaBottomRight |
| 26 | }); |
| 27 | |
| 28 | return obj; |
| 29 | } |
| 30 | |
| 31 | describe('Alpha', function () |
| 32 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…