Skip to content

Commit 6ad20e4

Browse files
committed
nits
1 parent cdb5653 commit 6ad20e4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

spec/ParsePushAdapter.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var ParsePushAdapterPackage = require('../src/index');
2+
var ParsePushAdapterModule = require('../src/ParsePushAdapter');
23
var ParsePushAdapter = ParsePushAdapterPackage.ParsePushAdapter;
34
var randomString = require('../src/PushAdapterUtils').randomString;
45
var APNS = require('../src/APNS').default;
@@ -18,6 +19,7 @@ describe('ParsePushAdapter', () => {
1819
it('properly export the module', () => {
1920
expect(typeof ParsePushAdapterPackage.default).toBe('function');
2021
expect(typeof ParsePushAdapterPackage.ParsePushAdapter).toBe('function');
22+
expect(typeof ParsePushAdapterModule.default).toBe('function');
2123
expect(typeof ParsePushAdapterPackage.APNS).toBe('function');
2224
expect(typeof ParsePushAdapterPackage.GCM).toBe('function');
2325
expect(typeof ParsePushAdapterPackage.utils).toBe('object');

src/PushAdapterUtils.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { randomBytes } from 'crypto';
66
* @param {Array} validPushTypes An array of valid push types(string)
77
* @returns {Object} A map whose key is device type and value is an array of device
88
*/
9-
export function classifyInstallations(installations, validPushTypes) {
9+
function classifyInstallations(installations, validPushTypes) {
1010
// Init deviceTokenMap, create a empty array for each valid pushType
1111
let deviceMap = {};
1212
for (let validPushType of validPushTypes) {
@@ -29,7 +29,7 @@ export function classifyInstallations(installations, validPushTypes) {
2929
return deviceMap;
3030
}
3131

32-
export function randomString(size) {
32+
function randomString(size) {
3333
if (size === 0) {
3434
throw new Error('Zero-length randomString is useless.');
3535
}
@@ -43,3 +43,5 @@ export function randomString(size) {
4343
}
4444
return objectId;
4545
}
46+
47+
export { classifyInstallations, randomString };

0 commit comments

Comments
 (0)