Skip to content

Instantly share code, notes, and snippets.

@martin-stone
Last active August 29, 2015 14:21
Show Gist options
  • Save martin-stone/cf99855f4a61f491dbf4 to your computer and use it in GitHub Desktop.
Save martin-stone/cf99855f4a61f491dbf4 to your computer and use it in GitHub Desktop.
Repro code for Pixi bind() failure in PhantomJS 1.x
Drop pixi.js alongside these files.
Run
npm install
grunt
module.exports = function (grunt) {
grunt.initConfig({
jasmine: {
test: {
src: ['*.js', '!*Spec.js'],
options: {
keepRunner: true,
summary: true,
specs: ['*Spec.js'],
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfig: {
baseUrl: '.',
}
},
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.registerTask('default', ['jasmine:test']);
};
define(function (require) {
"use strict";
var PIXI = require("pixi");
describe("It would be nice if Pixi", function() {
it("works in PhantomJS 1.x", function() {
expect(PIXI.autoDetectRenderer(100,100)).toBeTruthy();
});
});
});
{
"name": "pixitest",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-jasmine": "~0.8.2",
"grunt-contrib-requirejs": "~0.4.4",
"grunt-template-jasmine-requirejs": "~0.2.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment