Mark set/jump as a clean architecture
This commit is contained in:
parent
ebfb172520
commit
c6288f19d9
16 changed files with 316 additions and 137 deletions
|
@ -6,7 +6,6 @@ describe("mark reducer", () => {
|
|||
let state = reducer(undefined, {});
|
||||
expect(state.setMode).to.be.false;
|
||||
expect(state.jumpMode).to.be.false;
|
||||
expect(state.marks).to.be.empty;
|
||||
});
|
||||
|
||||
it('starts set mode', () => {
|
||||
|
@ -29,13 +28,4 @@ describe("mark reducer", () => {
|
|||
state = reducer({ jumpMode: true }, action);
|
||||
expect(state.jumpMode).to.be.false;
|
||||
});
|
||||
|
||||
it('stores local mark', () => {
|
||||
let action = { type: actions.MARK_SET_LOCAL, key: 'a', x: 20, y: 30};
|
||||
let state = reducer({ setMode: true }, action);
|
||||
expect(state.setMode).to.be.false;
|
||||
expect(state.marks['a']).to.be.an('object')
|
||||
expect(state.marks['a'].x).to.equal(20)
|
||||
expect(state.marks['a'].y).to.equal(30)
|
||||
});
|
||||
});
|
||||
|
|
Reference in a new issue