mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
21 lines
494 B
JavaScript
21 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();
|
||
|
});
|