API/api.medcify.app/node_modules/fcm-node/test/topic_options.test.js

20 lines
597 B
JavaScript
Raw Permalink Normal View History

2022-09-26 06:11:44 +00:00
const TopicOptions = require('../lib/topic_options.js');
var assert = require('assert');
module.exports = {
'test TopicOptions() ': function () {
const host = 'iid.googleapis.com/iid';
const path = '/v1:batchAdd';
const method = 'POST';
const serverKey = 'SERVER_KEY';
const options = TopicOptions(host, path, method, serverKey);
assert.equal(options.host, host);
assert.equal(options.path, path);
assert.equal(options.method, method);
assert.equal(options.headers.Host, host);
assert.equal(options.headers.Authorization, 'key=SERVER_KEY');
},
}