aboutsummaryrefslogtreecommitdiff
path: root/test/shared/messages.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-11 21:45:48 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-11 21:45:48 +0900
commitb2cddcd69b4ae06770d66808624fc43f3dcbcb0e (patch)
tree548eb65f678cfa1dca36773f01c635ec6c0e2066 /test/shared/messages.test.js
parent15d39a479aa7f2c4b804bac8c4352dd0a120bc75 (diff)
parent7bc569eac745b97137e1db8b9271493b3e5c8a20 (diff)
Merge branch 'message-passing-refactoring'
Diffstat (limited to 'test/shared/messages.test.js')
-rw-r--r--test/shared/messages.test.js25
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' });
- });
- });
-});