Page MenuHomePhabricator
Paste P12062

(An Untitled Masterwork)
ActivePublic

Authored by Jgiannelos on Mon, Jul 27, 3:21 PM.
import express from 'express';
import request from 'supertest';
const v1 = require('../../src/routes/v1');
describe('Push notitification routes', () => {
const tmp = express();
const obj = v1(tmp);
const app = express();
app.use(obj.router);
it('Should enqueue an APNS message', (done) => {
request(app).post('/message/apns')
.set('Accept', 'application/json')
.set('Content-Type', 'application/json').send({
deviceTokens: ['TOKEN'],
messageType: 'checkEchoV1',
dryRun: false
}).expect(200, done);
});
});

Event Timeline

Jgiannelos created this paste.Mon, Jul 27, 3:21 PM