mirror of
https://github.com/scratchfoundation/scratch-html5.git
synced 2025-03-02 16:13:53 -05:00
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
/* jasmine specs for Stage.js go here */
|
|
|
|
describe ('Stage', function() {
|
|
var stage;
|
|
|
|
beforeEach(function() {
|
|
stage = Stage;
|
|
});
|
|
|
|
describe('Instantization variables', function() {
|
|
var initStage, lineCanvas;
|
|
beforeEach(function() {
|
|
spyOn(Sprite, "call");
|
|
initStage = new stage(sensingData);
|
|
});
|
|
|
|
describe('Stage Variables', function() {
|
|
it('should have a z variable', function() {
|
|
expect(initStage.z).toBe(-2);
|
|
});
|
|
|
|
it('should have a penLayerLoaded variable', function() {
|
|
expect(initStage.penLayerLoaded).toBe(false);
|
|
});
|
|
|
|
it('should have a lineCanvas element', function() {
|
|
expect(initStage.lineCanvas).toBeDefined();
|
|
});
|
|
|
|
it('should have a lineCanvas width', function() {
|
|
expect(initStage.lineCanvas.width).toBe(480);
|
|
});
|
|
|
|
it('should have a lineCanvas height', function() {
|
|
expect(initStage.lineCanvas.height).toBe(360);
|
|
});
|
|
|
|
it('should have a lineCache variable', function() {
|
|
expect(initStage.lineCache).toBeDefined();
|
|
});
|
|
|
|
it('should have a isStage variable', function() {
|
|
expect(initStage.isStage).toBe(true);
|
|
});
|
|
|
|
it('should have called Sprite.call', function() {
|
|
expect(Sprite.call).toHaveBeenCalled();
|
|
});
|
|
});
|
|
});
|
|
});
|