state.js/test/index.spec.js

22 lines
417 B
JavaScript
Raw Normal View History

2019-06-24 19:45:14 +00:00
const test = require('tape');
const statejs = require('../src/state.js')({debug: true});
test('Index', function(t) {
var state = statejs;
t.test('setup', function(t) {
t.ok(state, 'state should be defined');
state.set('name', 'Geoff');
t.end();
});
t.test('state should have name', function(t) {
t.equal(state.get('name'), 'Geoff');
t.end();
});
});