Newer
Older
pixi.js / test / unit / core / display / DisplayObject.test.js
@Mat Groves Mat Groves on 17 Jul 2016 552 bytes fixed displahyObject destroy
describe('PIXI.DisplayObject', function () {
    it('should be able to add itself to a Container', function() {
        var child = new PIXI.DisplayObject(),
            container = new PIXI.Container();

        expect(container.children.length).to.equal(0);
        child.setParent(container);
        expect(container.children.length).to.equal(1);
        expect(child.parent).to.equal(container);
    });

    it('should be be able to destroy itself', function() {

    	var child = new PIXI.DisplayObject();

        child.destroy();

    });
});