From 8593b3f5cd0992dd250f5a845c19dc60bbb0bc91 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 9 Sep 2017 20:36:07 +0900 Subject: remove messages --- test/shared/messages.test.js | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 test/shared/messages.test.js (limited to 'test/shared') 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' }); - }); - }); -}); -- cgit v1.2.3