2017-01-14 16:14:25 +00:00
|
|
|
|
|
|
|
function assert(b, msg) {
|
|
|
|
if (!b) { throw new Error(msg); }
|
|
|
|
}
|
|
|
|
|
|
|
|
describe('Test VCS emulator', function() {
|
|
|
|
var platform = new VCSPlatform();
|
|
|
|
it('Should start', function(done) {
|
|
|
|
platform.start();
|
|
|
|
assert(!platform.isRunning());
|
|
|
|
// TODO: more testing
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Test Space Invaders emulator', function() {
|
2017-01-21 13:13:36 +00:00
|
|
|
var platform = new Midway8080BWPlatform($('#emulator')[0]);
|
2017-01-14 16:14:25 +00:00
|
|
|
it('Should start', function(done) {
|
|
|
|
platform.start();
|
|
|
|
assert(!platform.isRunning());
|
|
|
|
platform.resume();
|
|
|
|
assert(platform.isRunning());
|
|
|
|
// TODO: more testing
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|