diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-09 20:36:07 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-09 20:36:07 +0900 |
commit | 8593b3f5cd0992dd250f5a845c19dc60bbb0bc91 (patch) | |
tree | 64f0280b00417e23385580e0b3a5172ac8b79ceb /test/shared | |
parent | e6c5aea0748a108fc2c8eccc233130d08a957fb8 (diff) |
remove messages
Diffstat (limited to 'test/shared')
-rw-r--r-- | test/shared/messages.test.js | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/test/shared/messages.test.js b/test/shared/messages.test.js deleted file mode 100644 index 0ebaf1a..0000000 --- a/test/shared/messages.test.js +++ /dev/null @@ -1,25 +0,0 @@ -import { expect } from "chai"; -import * as messages from '../../src/shared/messages'; - -describe('messages', () => { - describe('#receive', () => { - it('received a message', (done) => { - messages.receive(window, (message) => { - expect(message).to.deep.equal({ type: 'vimvixen.test' }); - done(); - }); - window.postMessage(JSON.stringify({ type: 'vimvixen.test' }), '*'); - }); - }); - - describe('#send', () => { - it('sends a message', (done) => { - window.addEventListener('message', (e) => { - let json = JSON.parse(e.data); - expect(json).to.deep.equal({ type: 'vimvixen.test' }); - done(); - }); - messages.send(window, { type: 'vimvixen.test' }); - }); - }); -}); |