File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ Notification.prototype = require('./apsProperties');
6868Notification . prototype . headers = function headers ( ) {
6969 const headers = { } ;
7070
71- if ( this . priority !== 10 ) {
71+ if ( Number . isInteger ( this . priority ) ) {
7272 headers [ 'apns-priority' ] = this . priority ;
7373 }
7474
Original file line number Diff line number Diff line change @@ -154,14 +154,15 @@ describe('Notification', function () {
154154 expect ( note . headers ( ) ) . to . deep . equal ( {
155155 'apns-channel-id' : 'io.apn.channel' ,
156156 'apns-expiration' : 1000 ,
157+ "apns-priority" : 10 ,
157158 'apns-request-id' : 'io.apn.request' ,
158159 } ) ;
159160 } ) ;
160161 } ) ;
161162
162163 describe ( 'headers' , function ( ) {
163- it ( 'contains no properties by default' , function ( ) {
164- expect ( note . headers ( ) ) . to . deep . equal ( { } ) ;
164+ it ( 'contains only the priority property by default' , function ( ) {
165+ expect ( note . headers ( ) ) . to . deep . equal ( { "apns-priority" : 10 } ) ;
165166 } ) ;
166167
167168 context ( 'priority is non-default' , function ( ) {
You can’t perform that action at this time.
0 commit comments