initial command line store:

This commit is contained in:
Peter Cottle 2015-04-04 10:47:09 -07:00
parent ebfad44042
commit ca938ec79e
4 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,22 @@
var CommandLineActions = require('../actions/CommandLineActions');
var CommandLineStore = require('../stores/CommandLineStore');
describe('this store', function() {
it('starts with no entries', function() {
expect(CommandLineStore.getCommandHistoryLength())
.toEqual(0);
});
it('receives new commands', function() {
var command = 'git commit; git checkout HEAD';
CommandLineActions.submitCommand(command);
expect(CommandLineStore.getCommandHistoryLength())
.toEqual(1);
expect(CommandLineStore.getCommandHistory()[0])
.toEqual(command);
});
});