aboutsummaryrefslogtreecommitdiff
path: root/test/actions/command.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-14 22:04:42 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-16 21:08:18 +0900
commit83cb277ba2af2bc2f87ace1d97fa582a7043bcd5 (patch)
tree1ff5eb02fc6b7b12d0a1e825ba1fdb889a1e095b /test/actions/command.test.js
parent6127fdc285bc430b48259bd6e90b69623b4e76cc (diff)
consome as store/reducers
Diffstat (limited to 'test/actions/command.test.js')
-rw-r--r--test/actions/command.test.js51
1 files changed, 0 insertions, 51 deletions
diff --git a/test/actions/command.test.js b/test/actions/command.test.js
deleted file mode 100644
index 01a67f2..0000000
--- a/test/actions/command.test.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import { expect } from "chai";
-import actions from '../../src/actions';
-import * as commandActions from '../../src/actions/command';
-
-describe("command actions", () => {
- describe("exec", () => {
- context("open command", () => {
- it('create COMMAND_OPEN_URL acion with a full url', () => {
- let action = commandActions.exec("open https://github.com/")
- expect(action.type).to.equal(actions.COMMAND_OPEN_URL);
- expect(action.url).to.equal('https://github.com/');
- });
-
- it('create COMMAND_OPEN_URL acion with a domain name', () => {
- let action = commandActions.exec("open github.com")
- expect(action.type).to.equal(actions.COMMAND_OPEN_URL);
- expect(action.url).to.equal('http://github.com');
- });
- });
-
- context("tabopen command", () => {
- it('create COMMAND_TABOPEN_URL acion with a full url', () => {
- let action = commandActions.exec("tabopen https://github.com/")
- expect(action.type).to.equal(actions.COMMAND_TABOPEN_URL);
- expect(action.url).to.equal('https://github.com/');
- });
-
- it('create COMMAND_TABOPEN_URL acion with a domain name', () => {
- let action = commandActions.exec("tabopen github.com")
- expect(action.type).to.equal(actions.COMMAND_TABOPEN_URL);
- expect(action.url).to.equal('http://github.com');
- });
- });
-
- context("buffer command", () => {
- it('create COMMAND_BUFFER acion with a keywords', () => {
- let action = commandActions.exec("buffer foo bar")
- expect(action.type).to.equal(actions.COMMAND_BUFFER);
- expect(action.keywords).to.equal('foo bar');
- });
- });
-
- context("b command", () => {
- it('create COMMAND_BUFFER acion with a keywords', () => {
- let action = commandActions.exec("b foo bar")
- expect(action.type).to.equal(actions.COMMAND_BUFFER);
- expect(action.keywords).to.equal('foo bar');
- });
- });
- });
-});