@@ -27,14 +27,12 @@ describe('puppeteer-handle', () => {
2727
2828 it ( 'should enable arguments' , async ( ) => {
2929 const handle = ev ( ( ) => ( { add : ( a , b ) => a + b } ) )
30-
3130 expect ( await handle . add ( 1 , 4 ) ) . to . equal ( 5 )
3231 } )
3332
3433
3534 it ( 'should enable async functions' , async ( ) => {
3635 const handle = ev ( ( ) => ( { later : ( ) => Promise . resolve ( 4 ) } ) )
37-
3836 expect ( await handle . later ( ) ) . to . equal ( 4 )
3937 } )
4038
@@ -46,26 +44,22 @@ describe('puppeteer-handle', () => {
4644
4745 it ( 'shoult evaluate numbers' , async ( ) => {
4846 const handle = ev ( ( ) => ( { num : 789 } ) )
49-
5047 expect ( await handle . num ) . to . equal ( 789 )
5148 } )
5249
5350 it ( 'shoult evaluate objects' , async ( ) => {
5451 const handle = ev ( ( ) => ( { a : { b : 'something' } } ) )
55-
5652 expect ( await handle . a ) . to . deep . equal ( { b : 'something' } )
5753 } )
5854
5955 it ( 'should allow for a "then" property' , async ( ) => {
6056 const handle = ev ( ( ) => ( { then : 9 } ) )
61-
6257 expect ( await handle . then ) . to . equal ( 9 )
6358 } )
6459
6560
6661 it ( 'should allow functions in main object' , async ( ) => {
6762 const handle = ev ( ( ) => ( { a : ( ) => 12 } ) )
68-
6963 expect ( await handle . a ( ) ) . to . equal ( 12 )
7064 } )
7165
@@ -91,7 +85,6 @@ describe('puppeteer-handle', () => {
9185
9286 it ( 'should allow a callback in any arg' , async ( ) => {
9387 const handle = ev ( ( ) => ( { add : ( num , cb ) => cb ( num + 1 ) } ) )
94-
9588 const value = await new Promise ( resolve => handle . add ( 1 , resolve ) )
9689 expect ( value ) . to . equal ( 2 )
9790 } )
0 commit comments