@@ -13,7 +13,6 @@ import {Provider, connect} from 'react-redux';
13
13
import App from 'fusion-react' ;
14
14
import { getSimulator } from 'fusion-test-utils' ;
15
15
import { reactorEnhancer } from 'redux-reactors' ;
16
- import { UniversalEventsToken } from 'fusion-plugin-universal-events' ;
17
16
import { FetchToken } from 'fusion-tokens' ;
18
17
import { mock as RPCPluginMock , RPCHandlersToken } from '../index' ;
19
18
import Plugin from '../plugin' ;
@@ -33,9 +32,6 @@ function teardown() {
33
32
34
33
test ( 'browser plugin integration test withRPCRedux' , async t => {
35
34
setup ( ) ;
36
- const EventEmitter = {
37
- from ( ) { } ,
38
- } ;
39
35
const fetch = ( url , options ) => {
40
36
t . equal ( url , '/api/test' , 'fetches to expected url' ) ;
41
37
t . deepLooseEqual (
@@ -90,8 +86,6 @@ test('browser plugin integration test withRPCRedux', async t => {
90
86
) ;
91
87
const app = new App ( element ) ;
92
88
app . register ( Plugin ) ;
93
- app . register ( RPCHandlersToken , { } ) ;
94
- app . register ( UniversalEventsToken , EventEmitter ) ;
95
89
app . register ( FetchToken , fetch ) ;
96
90
await getSimulator ( app ) . render ( '/' ) ;
97
91
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
@@ -102,9 +96,6 @@ test('browser plugin integration test withRPCRedux', async t => {
102
96
103
97
test ( 'browser plugin integration test withRPCRedux - failure' , async t => {
104
98
setup ( ) ;
105
- const EventEmitter = {
106
- from ( ) { } ,
107
- } ;
108
99
const fetch = ( url , options ) => {
109
100
t . equal ( url , '/api/test' , 'fetches to expected url' ) ;
110
101
t . deepLooseEqual (
@@ -165,8 +156,6 @@ test('browser plugin integration test withRPCRedux - failure', async t => {
165
156
) ;
166
157
const app = new App ( element ) ;
167
158
app . register ( Plugin ) ;
168
- app . register ( RPCHandlersToken , { } ) ;
169
- app . register ( UniversalEventsToken , EventEmitter ) ;
170
159
app . register ( FetchToken , fetch ) ;
171
160
await getSimulator ( app ) . render ( '/' ) ;
172
161
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
@@ -176,9 +165,6 @@ test('browser plugin integration test withRPCRedux - failure', async t => {
176
165
177
166
test ( 'browser mock integration test withRPCRedux' , async t => {
178
167
setup ( ) ;
179
- const EventEmitter = {
180
- from ( ) { } ,
181
- } ;
182
168
const handlers = {
183
169
test ( args ) {
184
170
t . deepLooseEqual (
@@ -224,8 +210,6 @@ test('browser mock integration test withRPCRedux', async t => {
224
210
const app = new App ( element ) ;
225
211
app . register ( RPCPluginMock ) ;
226
212
app . register ( RPCHandlersToken , handlers ) ;
227
- app . register ( UniversalEventsToken , EventEmitter ) ;
228
- app . register ( FetchToken , fetch ) ;
229
213
await getSimulator ( app ) . render ( '/' ) ;
230
214
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
231
215
teardown ( ) ;
@@ -234,9 +218,6 @@ test('browser mock integration test withRPCRedux', async t => {
234
218
235
219
test ( 'browser mock integration test withRPCRedux - failure' , async t => {
236
220
setup ( ) ;
237
- const EventEmitter = {
238
- from ( ) { } ,
239
- } ;
240
221
const e = new Error ( 'message' ) ;
241
222
e . code = 'code' ;
242
223
e . meta = { hello : 'world' } ;
@@ -289,8 +270,6 @@ test('browser mock integration test withRPCRedux - failure', async t => {
289
270
const app = new App ( element ) ;
290
271
app . register ( RPCPluginMock ) ;
291
272
app . register ( RPCHandlersToken , handlers ) ;
292
- app . register ( UniversalEventsToken , EventEmitter ) ;
293
- app . register ( FetchToken , fetch ) ;
294
273
await getSimulator ( app ) . render ( '/' ) ;
295
274
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
296
275
teardown ( ) ;
@@ -299,9 +278,6 @@ test('browser mock integration test withRPCRedux - failure', async t => {
299
278
300
279
test ( 'browser plugin integration test withRPCReactor' , async t => {
301
280
setup ( ) ;
302
- const EventEmitter = {
303
- from ( ) { } ,
304
- } ;
305
281
const fetch = ( url , options ) => {
306
282
t . equal ( url , '/api/test' , 'fetches to expected url' ) ;
307
283
t . deepLooseEqual (
@@ -387,8 +363,6 @@ test('browser plugin integration test withRPCReactor', async t => {
387
363
) ;
388
364
const app = new App ( element ) ;
389
365
app . register ( Plugin ) ;
390
- app . register ( RPCHandlersToken , { } ) ;
391
- app . register ( UniversalEventsToken , EventEmitter ) ;
392
366
app . register ( FetchToken , fetch ) ;
393
367
await getSimulator ( app ) . render ( '/' ) ;
394
368
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
@@ -400,9 +374,6 @@ test('browser plugin integration test withRPCReactor', async t => {
400
374
401
375
test ( 'browser mock plugin integration test withRPCReactor' , async t => {
402
376
setup ( ) ;
403
- const EventEmitter = {
404
- from ( ) { } ,
405
- } ;
406
377
const handlers = {
407
378
test ( args ) {
408
379
t . deepLooseEqual (
@@ -480,8 +451,6 @@ test('browser mock plugin integration test withRPCReactor', async t => {
480
451
const app = new App ( element ) ;
481
452
app . register ( RPCPluginMock ) ;
482
453
app . register ( RPCHandlersToken , handlers ) ;
483
- app . register ( UniversalEventsToken , EventEmitter ) ;
484
- app . register ( FetchToken , fetch ) ;
485
454
await getSimulator ( app ) . render ( '/' ) ;
486
455
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
487
456
t . equal ( flags . start , true , 'dispatches start action' ) ;
@@ -492,9 +461,6 @@ test('browser mock plugin integration test withRPCReactor', async t => {
492
461
493
462
test ( 'browser plugin integration test withRPCReactor - failure' , async t => {
494
463
setup ( ) ;
495
- const EventEmitter = {
496
- from ( ) { } ,
497
- } ;
498
464
const e = new Error ( 'Some failure' ) ;
499
465
e . code = 'ERR_CODE' ;
500
466
e . meta = { error : 'meta' } ;
@@ -580,8 +546,6 @@ test('browser plugin integration test withRPCReactor - failure', async t => {
580
546
const app = new App ( element ) ;
581
547
app . register ( RPCPluginMock ) ;
582
548
app . register ( RPCHandlersToken , handlers ) ;
583
- app . register ( UniversalEventsToken , EventEmitter ) ;
584
- app . register ( FetchToken , fetch ) ;
585
549
await getSimulator ( app ) . render ( '/' ) ;
586
550
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
587
551
t . equal ( flags . start , true , 'dispatches start action' ) ;
@@ -590,14 +554,11 @@ test('browser plugin integration test withRPCReactor - failure', async t => {
590
554
t . end ( ) ;
591
555
} ) ;
592
556
593
- test ( 'browser plugin integration test withRPCReactor - failure' , async t => {
557
+ test ( 'browser plugin integration test withRPCReactor - failure 2 ' , async t => {
594
558
setup ( ) ;
595
559
const e = new Error ( 'Some failure' ) ;
596
560
e . code = 'ERR_CODE' ;
597
561
e . meta = { error : 'meta' } ;
598
- const EventEmitter = {
599
- from ( ) { } ,
600
- } ;
601
562
const fetch = ( url , options ) => {
602
563
t . equal ( url , '/api/test' , 'fetches to expected url' ) ;
603
564
t . deepLooseEqual (
@@ -690,8 +651,6 @@ test('browser plugin integration test withRPCReactor - failure', async t => {
690
651
) ;
691
652
const app = new App ( element ) ;
692
653
app . register ( Plugin ) ;
693
- app . register ( RPCHandlersToken , { } ) ;
694
- app . register ( UniversalEventsToken , EventEmitter ) ;
695
654
app . register ( FetchToken , fetch ) ;
696
655
await getSimulator ( app ) . render ( '/' ) ;
697
656
t . equal ( expectedActions . length , 0 , 'dispatches all actions' ) ;
0 commit comments