UNPKG

showandtell

Version:

A Javascript library providing debugger-like command-line interactivity for program state inspection and modification

20 lines (16 loc) 559 B
'use strict' /* globals describe, it */ const expect = require('chai').expect const story = require('../../lib/story') const command = require('../../lib/command') describe('story.Session', () => { it('can allow an array of commands to be registered and executed by the user', (done) => { const session = new story.Session([command.set, command.show]) session.start({test: 32}) .then((newState) => { // Set `test` to 33 using the `SET` command expect(newState).to.have.property('test').and.equal('33') done() }) }) })