JAVASCRIPT 30
Rope.js Guest on 20th April 2021 11:24:10 PM
  1. describe('pixi/extras/Rope', function () {
  2.     'use strict';
  3.  
  4.     var expect = chai.expect;
  5.     var Rope = PIXI.Rope;
  6.     var Texture = PIXI.Texture;
  7.     var Point = PIXI.Point;
  8.  
  9.     it('Module exists', function () {
  10.         expect(Rope).to.be.a('function');
  11.     });
  12.  
  13.     it('Confirm new instance', function () {
  14.      
  15.         var texture = Texture.fromImage('/base/test/textures/bunny.png');
  16.  
  17.         // TODO-Alvin
  18.         // Same as Strip
  19.  
  20.         // var obj = new Rope(texture, [new Point(), new Point(5, 10), new Point(10, 20)]);
  21.  
  22.         // pixi_extras_Strip_confirmNew(obj);
  23.  
  24.         // expect(obj).to.be.an.instanceof(Rope);
  25.         // expect(obj).to.respondTo('refresh');
  26.         // expect(obj).to.respondTo('updateTransform');
  27.         // expect(obj).to.respondTo('setTexture');
  28.  
  29.         // TODO: Test properties
  30.     });
  31. });

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.