showandtell
Version:
A Javascript library providing debugger-like command-line interactivity for program state inspection and modification
28 lines (23 loc) • 667 B
JavaScript
/* globals describe, it */
const expect = require('chai').expect
const story = require('../../lib/story')
describe('story.Session', () => {
describe('the start method', () => {
it('terminates when the user enters the QUIT command', (done) => {
const session = new story.Session()
session.start({test: 32})
.then((newState) => {
expect(newState).to.have.property('test').and.equal(32)
done()
})
})
it('provides a HELP command to get information about commands', (done) => {
const session = new story.Session()
session.start()
.then(() => {
done()
})
})
})
})