aboutsummaryrefslogtreecommitdiff
path: root/test/content
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-10-11 17:20:02 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-10-11 17:33:27 +0900
commitf66e75575dd26b7f60e70c9856d8cd56770f74e7 (patch)
tree30373c16b1d3d9743fbae2413cca8dc313c8e136 /test/content
parente6d990966a99f4a80606ef42da8da9e009826f43 (diff)
Store x position into marks
Diffstat (limited to 'test/content')
-rw-r--r--test/content/actions/mark.test.js3
-rw-r--r--test/content/reducers/mark.test.js8
2 files changed, 7 insertions, 4 deletions
diff --git a/test/content/actions/mark.test.js b/test/content/actions/mark.test.js
index 47d31cd..adbf06b 100644
--- a/test/content/actions/mark.test.js
+++ b/test/content/actions/mark.test.js
@@ -25,9 +25,10 @@ describe('mark actions', () => {
describe('setLocal', () => {
it('create setLocal action', () => {
- let action = markActions.setLocal('a', 30);
+ let action = markActions.setLocal('a', 20, 30);
expect(action.type).to.equal(actions.MARK_SET_LOCAL);
expect(action.key).to.equal('a');
+ expect(action.x).to.equal(20);
expect(action.y).to.equal(30);
});
});
diff --git a/test/content/reducers/mark.test.js b/test/content/reducers/mark.test.js
index 6358bf1..76efbf7 100644
--- a/test/content/reducers/mark.test.js
+++ b/test/content/reducers/mark.test.js
@@ -31,9 +31,11 @@ describe("mark reducer", () => {
});
it('stores local mark', () => {
- let action = { type: actions.MARK_SET_LOCAL, key: 'a', y: 10 };
- let state = reducer(undefined, action);
+ 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'].y).to.equal(10)
+ expect(state.marks['a'].x).to.equal(20)
+ expect(state.marks['a'].y).to.equal(30)
});
});