mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
20 lines
494 B
JavaScript
20 lines
494 B
JavaScript
var test = require('tap').test;
|
|
var adapter = require('../../src/engine/adapter');
|
|
var events = require('../fixtures/events.json');
|
|
|
|
test('spec', function (t) {
|
|
t.type(adapter, 'function');
|
|
t.end();
|
|
});
|
|
|
|
test('create event', function (t) {
|
|
var result = adapter(events.create);
|
|
|
|
t.type(result, 'object');
|
|
t.type(result.id, 'string');
|
|
t.type(result.opcode, 'string');
|
|
t.type(result.fields, 'object');
|
|
t.type(result.fields['DURATION'], 'object');
|
|
|
|
t.end();
|
|
});
|