Newer
Older
pixi.js / test / core / DisplayObject.js
@Chad Engler Chad Engler on 27 Sep 2016 433 bytes Huge refactor to match a new shiny eslint file.
'use strict';

describe('PIXI.DisplayObject', function ()
{
    it('should be able to add itself to a Container', function ()
    {
        var child = new PIXI.DisplayObject();
        var 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);
    });
});