File tree 2 files changed +4
-3
lines changed
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');
68
68
Notification . prototype . headers = function headers ( ) {
69
69
const headers = { } ;
70
70
71
- if ( this . priority !== 10 ) {
71
+ if ( Number . isInteger ( this . priority ) ) {
72
72
headers [ 'apns-priority' ] = this . priority ;
73
73
}
74
74
Original file line number Diff line number Diff line change @@ -154,14 +154,15 @@ describe('Notification', function () {
154
154
expect ( note . headers ( ) ) . to . deep . equal ( {
155
155
'apns-channel-id' : 'io.apn.channel' ,
156
156
'apns-expiration' : 1000 ,
157
+ "apns-priority" : 10 ,
157
158
'apns-request-id' : 'io.apn.request' ,
158
159
} ) ;
159
160
} ) ;
160
161
} ) ;
161
162
162
163
describe ( 'headers' , function ( ) {
163
- it ( 'contains no properties by default' , function ( ) {
164
- expect ( note . headers ( ) ) . to . deep . equal ( { } ) ;
164
+ it ( 'contains only thr priority property by default' , function ( ) {
165
+ expect ( note . headers ( ) ) . to . deep . equal ( { "apns-priority" : 10 } ) ;
165
166
} ) ;
166
167
167
168
context ( 'priority is non-default' , function ( ) {
You can’t perform that action at this time.
0 commit comments