This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
scratch-html5/test/unit/threadSpec.js

51 lines
1.5 KiB
JavaScript
Raw Normal View History

2014-03-09 11:59:38 -06:00
/* jasmine specs for Interpreter.js -> Thread go here */
describe('Thread', function() {
var thread;
2014-03-09 11:59:38 -06:00
beforeEach(function() {
thread = Thread;
2014-03-09 11:59:38 -06:00
});
describe('Initialized variables', function() {
var initThread;
beforeEach(function() {
initThread = new thread('block', 'target');
});
describe('Thread Variables', function() {
it('should have a nextBlock variable', function() {
expect(initThread.nextBlock).toBe('block');
});
it('should have a firstBlock variable', function() {
expect(initThread.firstBlock).toBe('block');
});
it('should have a stack variable', function() {
expect(initThread.stack).toEqual([]);
});
it('should have a target variable', function() {
expect(initThread.target).toBe('target');
});
it('should have a tmp variable', function() {
expect(initThread.tmp).toBe(null);
});
it('should have a tmpObj variable', function() {
expect(initThread.tmpObj).toEqual([]);
});
it('should have a firstTime variable', function() {
expect(initThread.firstTime).toBe(true);
});
it('should have a paused variable', function() {
expect(initThread.paused).toBe(false);
});
});
2014-03-09 11:59:38 -06:00
});
});