phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers from the team at Phaser Studio Inc.
17 lines (14 loc) • 786 B
JavaScript
var GameObjectFactory = require('../../../../src/gameobjects/GameObjectFactory');
describe('DynamicBitmapTextFactory', function ()
{
it('should be importable', function ()
{
// DynamicBitmapTextFactory registers itself onto GameObjectFactory as a side
// effect of being required. The full factory function cannot be exercised in
// a headless Node environment because DynamicBitmapText extends a chain of
// Phaser Game Objects that depend on Canvas / WebGL / DOM APIs.
// We verify only that the module loads cleanly and registers its method.
require('../../../../src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory');
expect(typeof GameObjectFactory.prototype.dynamicBitmapText).toBe('function');
});
});