scratch-vm/test/unit/clone.js
Tim Mickel 5728d648b1 Ensure clone.effects is defined on each instance (#225)
* Ensure clone.effects is defined on each instance

* Add regression test for GH-224
2016-10-03 10:16:43 -04:00

13 lines
441 B
JavaScript

var test = require('tap').test;
var Clone = require('../../src/sprites/clone');
var Sprite = require('../../src/sprites/sprite');
test('clone effects', function (t) {
// Create two clones and ensure they have different graphic effect objects.
// Regression test for Github issue #224
var spr = new Sprite();
var a = new Clone(spr, null);
var b = new Clone(spr, null);
t.ok(a.effects !== b.effects);
t.end();
});