diff options
Diffstat (limited to 'test/shared')
-rw-r--r-- | test/shared/urls.test.js | 9 | ||||
-rw-r--r-- | test/shared/utils/keys.test.js | 20 |
2 files changed, 20 insertions, 9 deletions
diff --git a/test/shared/urls.test.js b/test/shared/urls.test.js index f004b3d..f2950b6 100644 --- a/test/shared/urls.test.js +++ b/test/shared/urls.test.js @@ -44,14 +44,5 @@ describe("shared/commands/parsers", () => { .to.equal('http://google.com'); }); }); - - describe('#homepageUrls', () => { - it('split urls', () => { - expect(parsers.homepageUrls('https://google.com/')) - .to.deep.equal(['https://google.com/']); - expect(parsers.homepageUrls('yahoo.com|https://i-beam.org/')) - .to.deep.equal(['http://yahoo.com', 'https://i-beam.org/']); - }); - }); }); diff --git a/test/shared/utils/keys.test.js b/test/shared/utils/keys.test.js index 770b530..b2ad3cb 100644 --- a/test/shared/utils/keys.test.js +++ b/test/shared/utils/keys.test.js @@ -35,6 +35,17 @@ describe("keys util", () => { expect(k.altKey).to.be.false; expect(k.metaKey).to.be.false; }); + + it('returns from keyboard input Crtl+Space', () => { + let k = keys.fromKeyboardEvent({ + key: ' ', shiftKey: false, ctrlKey: true, altKey: false, metaKey: false + }); + expect(k.key).to.equal('Space'); + expect(k.shiftKey).to.be.false; + expect(k.ctrlKey).to.be.true; + expect(k.altKey).to.be.false; + expect(k.metaKey).to.be.false; + }); }); describe('fromMapKey', () => { @@ -100,6 +111,15 @@ describe("keys util", () => { expect(key.altKey).to.be.false; expect(key.metaKey).to.be.false; }); + + it('returns for Ctrl+Esc', () => { + let key = keys.fromMapKey('<C-Space>'); + expect(key.key).to.equal('Space'); + expect(key.shiftKey).to.be.false; + expect(key.ctrlKey).to.be.true; + expect(key.altKey).to.be.false; + expect(key.metaKey).to.be.false; + }); }); describe('fromMapKeys', () => { |