Removes need to use babel-register (#4865)
* Removes need to use babel-register - Adds watch to watch changes when running the test to regenerate - Tests are now pure node 8 * Adds timing to helper.js * Update contribution guide * Adds inline sourcemaps generation to restore coverage * nits
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
const PushWorker = require('../src').PushWorker;
|
||||
const PushUtils = require('../src/Push/utils');
|
||||
const Config = require('../src/Config');
|
||||
const { pushStatusHandler } = require('../src/StatusHandler');
|
||||
const rest = require('../src/rest');
|
||||
const PushWorker = require('../lib').PushWorker;
|
||||
const PushUtils = require('../lib/Push/utils');
|
||||
const Config = require('../lib/Config');
|
||||
const { pushStatusHandler } = require('../lib/StatusHandler');
|
||||
const rest = require('../lib/rest');
|
||||
|
||||
describe('PushWorker', () => {
|
||||
it('should run with small batch', (done) => {
|
||||
@@ -90,6 +90,10 @@ describe('PushWorker', () => {
|
||||
expect(locales).toEqual(['fr']);
|
||||
});
|
||||
|
||||
it('should handle empty body data', () => {
|
||||
expect(PushUtils.getLocalesFromPush({})).toEqual([]);
|
||||
});
|
||||
|
||||
it('transforms body appropriately', () => {
|
||||
const cleanBody = PushUtils.transformPushBodyForLocale({
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user