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:
11
11
strategy :
12
12
matrix :
13
13
include :
14
- - name : Node.js 12
15
- NODE_VERSION : 12
16
14
- name : Node.js 14
17
15
NODE_VERSION : 14
18
16
- name : Node.js 16
19
17
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 }}
20
24
runs-on : ubuntu-latest
21
25
timeout-minutes : 30
22
26
steps :
Original file line number Diff line number Diff line change @@ -352,9 +352,7 @@ describe('Client', () => {
352
352
const result = await client . write ( mockNotification , mockDevice ) ;
353
353
// Should not happen, but if it does, the promise should resolve with an error
354
354
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 ) ;
358
356
} ;
359
357
await runRequestWithInternalServerError ( ) ;
360
358
await runRequestWithInternalServerError ( ) ;
@@ -427,10 +425,8 @@ describe('Client', () => {
427
425
const mockDevice = MOCK_DEVICE_TOKEN ;
428
426
const performRequestExpectingGoAway = async ( ) => {
429
427
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 ) ;
434
430
expect ( didGetRequest ) . to . be . true ;
435
431
didGetRequest = false ;
436
432
} ;
Original file line number Diff line number Diff line change @@ -373,9 +373,7 @@ describe('MultiClient', () => {
373
373
const result = await client . write ( mockNotification , mockDevice ) ;
374
374
// Should not happen, but if it does, the promise should resolve with an error
375
375
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 ) ;
379
377
} ;
380
378
await runRequestWithInternalServerError ( ) ;
381
379
await runRequestWithInternalServerError ( ) ;
@@ -448,10 +446,8 @@ describe('MultiClient', () => {
448
446
const mockDevice = MOCK_DEVICE_TOKEN ;
449
447
const performRequestExpectingGoAway = async ( ) => {
450
448
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 ) ;
455
451
expect ( didGetRequest ) . to . be . true ;
456
452
didGetRequest = false ;
457
453
} ;
Original file line number Diff line number Diff line change @@ -960,7 +960,6 @@ describe('Notification', function () {
960
960
describe ( 'setContentState' , function ( ) {
961
961
it ( 'is chainable' , function ( ) {
962
962
expect ( note . setContentState ( payload ) ) . to . equal ( note ) ;
963
- console . log ( compiledOutput ( ) ) ;
964
963
expect ( compiledOutput ( ) )
965
964
. to . have . nested . property ( 'aps.content-state' )
966
965
. that . deep . equals ( payload ) ;
You can’t perform that action at this time.
0 commit comments