scratch-vm/test/unit/adapter.js
2016-04-26 09:49:52 -04:00

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();
});