File tree Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,16 @@ jobs:
1111 strategy :
1212 matrix :
1313 include :
14- - name : Node.js 12
15- NODE_VERSION : 12
1614 - name : Node.js 14
1715 NODE_VERSION : 14
1816 - name : Node.js 16
1917 NODE_VERSION : 16
18+ - name : Node.js 18
19+ NODE_VERSION : 18
20+ - name : Node.js 20
21+ NODE_VERSION : 20
22+ fail-fast : false
23+ name : ${{ matrix.name }}
2024 runs-on : ubuntu-latest
2125 timeout-minutes : 30
2226 steps :
Original file line number Diff line number Diff line change @@ -352,9 +352,7 @@ describe('Client', () => {
352352 const result = await client . write ( mockNotification , mockDevice ) ;
353353 // Should not happen, but if it does, the promise should resolve with an error
354354 expect ( result . device ) . to . equal ( MOCK_DEVICE_TOKEN ) ;
355- expect ( result . error . message ) . to . equal (
356- 'Unexpected error processing APNs response: Unexpected token P in JSON at position 0'
357- ) ;
355+ expect ( result . error . message . startsWith ( 'Unexpected error processing APNs response: Unexpected token' ) ) . to . equal ( true ) ;
358356 } ;
359357 await runRequestWithInternalServerError ( ) ;
360358 await runRequestWithInternalServerError ( ) ;
@@ -427,10 +425,8 @@ describe('Client', () => {
427425 const mockDevice = MOCK_DEVICE_TOKEN ;
428426 const performRequestExpectingGoAway = async ( ) => {
429427 const result = await client . write ( mockNotification , mockDevice ) ;
430- expect ( result ) . to . deep . equal ( {
431- device : MOCK_DEVICE_TOKEN ,
432- error : new VError ( 'stream ended unexpectedly with status null and empty body' ) ,
433- } ) ;
428+ expect ( result . device ) . to . equal ( MOCK_DEVICE_TOKEN ) ;
429+ expect ( result . error ) . to . be . an . instanceof ( VError ) ;
434430 expect ( didGetRequest ) . to . be . true ;
435431 didGetRequest = false ;
436432 } ;
Original file line number Diff line number Diff line change @@ -373,9 +373,7 @@ describe('MultiClient', () => {
373373 const result = await client . write ( mockNotification , mockDevice ) ;
374374 // Should not happen, but if it does, the promise should resolve with an error
375375 expect ( result . device ) . to . equal ( MOCK_DEVICE_TOKEN ) ;
376- expect ( result . error . message ) . to . equal (
377- 'Unexpected error processing APNs response: Unexpected token P in JSON at position 0'
378- ) ;
376+ expect ( result . error . message . startsWith ( 'Unexpected error processing APNs response: Unexpected token' ) ) . to . equal ( true ) ;
379377 } ;
380378 await runRequestWithInternalServerError ( ) ;
381379 await runRequestWithInternalServerError ( ) ;
@@ -448,10 +446,8 @@ describe('MultiClient', () => {
448446 const mockDevice = MOCK_DEVICE_TOKEN ;
449447 const performRequestExpectingGoAway = async ( ) => {
450448 const result = await client . write ( mockNotification , mockDevice ) ;
451- expect ( result ) . to . deep . equal ( {
452- device : MOCK_DEVICE_TOKEN ,
453- error : new VError ( 'stream ended unexpectedly with status null and empty body' ) ,
454- } ) ;
449+ expect ( result . device ) . to . equal ( MOCK_DEVICE_TOKEN ) ;
450+ expect ( result . error ) . to . be . an . instanceof ( VError ) ;
455451 expect ( didGetRequest ) . to . be . true ;
456452 didGetRequest = false ;
457453 } ;
Original file line number Diff line number Diff line change @@ -960,7 +960,6 @@ describe('Notification', function () {
960960 describe ( 'setContentState' , function ( ) {
961961 it ( 'is chainable' , function ( ) {
962962 expect ( note . setContentState ( payload ) ) . to . equal ( note ) ;
963- console . log ( compiledOutput ( ) ) ;
964963 expect ( compiledOutput ( ) )
965964 . to . have . nested . property ( 'aps.content-state' )
966965 . that . deep . equals ( payload ) ;
You can’t perform that action at this time.
0 commit comments