mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
initial command line store:
This commit is contained in:
parent
ebfad44042
commit
ca938ec79e
4 changed files with 108 additions and 0 deletions
22
src/js/__tests__/CommandLineStore.spec.js
Normal file
22
src/js/__tests__/CommandLineStore.spec.js
Normal 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);
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue