moar jshint fixes for tests
This commit is contained in:
parent
5d516cfb81
commit
6dafb2524d
6 changed files with 51 additions and 20 deletions
|
@ -16,7 +16,7 @@ describe('Example 1 - Basics', function () {
|
|||
function animate() {
|
||||
currentFrame += 1;
|
||||
|
||||
requestAnimFrame( animate );
|
||||
window.requestAnimFrame( animate );
|
||||
|
||||
// just for fun, lets rotate mr rabbit a little
|
||||
bunny.rotation += 0.1;
|
||||
|
@ -39,10 +39,10 @@ describe('Example 1 - Basics', function () {
|
|||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
||||
requestAnimFrame( animate );
|
||||
window.requestAnimFrame( animate );
|
||||
|
||||
// create a texture from an image path
|
||||
var texture = PIXI.Texture.fromImage(baseUri + "/bunny.png");
|
||||
var texture = PIXI.Texture.fromImage(baseUri + '/bunny.png');
|
||||
// create a new Sprite using the texture
|
||||
bunny = new PIXI.Sprite(texture);
|
||||
|
||||
|
@ -67,7 +67,7 @@ describe('Example 1 - Basics', function () {
|
|||
// loader.on('onProgress', function (event) {
|
||||
// console.log(event.content);
|
||||
// });
|
||||
loader.on('onComplete', function (event) {
|
||||
loader.on('onComplete', function () {
|
||||
done();
|
||||
initScene();
|
||||
});
|
||||
|
|
|
@ -2,9 +2,9 @@ describe('pixi/filters/MaskFilter', function () {
|
|||
'use strict';
|
||||
|
||||
var expect = chai.expect;
|
||||
// var MaskFilter = PIXI.MaskFilter;
|
||||
var MaskFilter = PIXI.MaskFilter;
|
||||
|
||||
// it('Module exists', function () {
|
||||
// expect(MaskFilter).to.be.a('function');
|
||||
// });
|
||||
it('Module exists', function () {
|
||||
expect(MaskFilter).to.be.a('function');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,7 +2,6 @@ describe('pixi/loaders/BitmapFontLoader', function () {
|
|||
'use strict';
|
||||
|
||||
var expect = chai.expect;
|
||||
var BitmapFontLoader = PIXI.BitmapFontLoader;
|
||||
|
||||
it('Module exists', function () {
|
||||
expect(PIXI.BitmapFontLoader).to.be.a('function');
|
||||
|
|
|
@ -9,13 +9,17 @@ describe('pixi/utils/EventTarget', function () {
|
|||
});
|
||||
|
||||
it('Confirm new instance', function () {
|
||||
var obj = {}; EventTarget.call(obj);
|
||||
var obj = {};
|
||||
|
||||
EventTarget.call(obj);
|
||||
pixi_utils_EventTarget_like(obj);
|
||||
});
|
||||
|
||||
it('addEventListener and dispatchEvent works', function (done) {
|
||||
var myData = {},
|
||||
obj = {}; EventTarget.call(obj);
|
||||
obj = {};
|
||||
|
||||
EventTarget.call(obj);
|
||||
|
||||
obj.addEventListener('myevent', function (event) {
|
||||
expect(event).to.be.an('object');
|
||||
|
@ -28,7 +32,9 @@ describe('pixi/utils/EventTarget', function () {
|
|||
});
|
||||
|
||||
it('removeEventListener works', function (done) {
|
||||
var obj = {}; EventTarget.call(obj);
|
||||
var obj = {};
|
||||
|
||||
EventTarget.call(obj);
|
||||
|
||||
function onMyEvent() {
|
||||
done(new Error('addEventListener should not have been called'));
|
||||
|
@ -42,7 +48,9 @@ describe('pixi/utils/EventTarget', function () {
|
|||
|
||||
it('multiple dispatches', function () {
|
||||
var called = 0,
|
||||
obj = {}; EventTarget.call(obj);
|
||||
obj = {};
|
||||
|
||||
EventTarget.call(obj);
|
||||
|
||||
function onMyEvent() {
|
||||
called++;
|
||||
|
@ -58,7 +66,9 @@ describe('pixi/utils/EventTarget', function () {
|
|||
|
||||
it('multiple events', function () {
|
||||
var called = 0,
|
||||
obj = {}; EventTarget.call(obj);
|
||||
obj = {};
|
||||
|
||||
EventTarget.call(obj);
|
||||
|
||||
function onMyEvent() {
|
||||
called++;
|
||||
|
@ -75,7 +85,9 @@ describe('pixi/utils/EventTarget', function () {
|
|||
|
||||
it('multiple events one removed', function () {
|
||||
var called = 0,
|
||||
obj = {}; EventTarget.call(obj);
|
||||
obj = {};
|
||||
|
||||
EventTarget.call(obj);
|
||||
|
||||
function onMyEvent() {
|
||||
called++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue