11const chai = require ( 'chai' ) ;
22const lib = require ( '../lib/index' ) ;
33const common = require ( './common' ) ;
4- chai . use ( require ( 'chai-as-promised' ) ) ;
54
65chai . should ( ) ;
76
@@ -29,11 +28,11 @@ describe('Index', () => {
2928 } ;
3029 const z = await lib ( common . config ) ;
3130 const stubs = common . getStubs ( validator , output ) ;
32- z . callEndpoint ( '/testurl' , 'GET' , params ) . should . eventually . have . property (
31+ ( await z . callEndpoint ( '/testurl' , 'GET' , params ) ) . should . have . property (
3332 'result' ,
3433 'success'
3534 ) ;
36- z . callEndpoint ( 'testurl' , 'GET' , params ) . should . eventually . have . property (
35+ ( await z . callEndpoint ( 'testurl' , 'GET' , params ) ) . should . have . property (
3736 'result' ,
3837 'success'
3938 ) ;
@@ -49,11 +48,11 @@ describe('Index', () => {
4948 } ;
5049 const z = await lib ( common . config ) ;
5150 const stubs = common . getStubs ( validator , output ) ;
52- z . callEndpoint ( '/testurl' , 'POST' , params ) . should . eventually . have . property (
51+ ( await z . callEndpoint ( '/testurl' , 'POST' , params ) ) . should . have . property (
5352 'result' ,
5453 'success'
5554 ) ;
56- z . callEndpoint ( 'testurl' , 'POST' , params ) . should . eventually . have . property (
55+ ( await z . callEndpoint ( 'testurl' , 'POST' , params ) ) . should . have . property (
5756 'result' ,
5857 'success'
5958 ) ;
0 commit comments