JAVASCRIPT 25
TilingSprite.js Guest on 20th April 2021 11:21:48 PM
  1. describe('pixi/extras/TilingSprite', function () {
  2.     'use strict';
  3.  
  4.     var expect = chai.expect;
  5.     var TilingSprite = PIXI.TilingSprite;
  6.     var Texture = PIXI.Texture;
  7.  
  8.     it('Module exists', function () {
  9.         expect(TilingSprite).to.be.a('function');
  10.     });
  11.  
  12.     it('Confirm new instance', function () {
  13.         var texture = Texture.fromImage('/base/test/textures/bunny.png');
  14.         var obj = new TilingSprite(texture, 6000, 12000);
  15.  
  16.         pixi_display_DisplayObjectContainer_confirmNew(obj);
  17.  
  18.         expect(obj).to.be.an.instanceof(TilingSprite);
  19.         expect(obj).to.respondTo('setTexture');
  20.         expect(obj).to.respondTo('onTextureUpdate');
  21.  
  22.         // TODO: Test properties
  23.     });
  24. });

Paste-bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.