feat: Upgrade to @parse/push-adapter 6.4.0 (#9182)

This commit is contained in:
Diamond Lewis
2024-07-08 15:23:57 -05:00
committed by GitHub
parent e7199e8d07
commit ef1634bf1f
6 changed files with 203 additions and 234 deletions

View File

@@ -1,6 +1,5 @@
const loadAdapter = require('../lib/Adapters/AdapterLoader').loadAdapter;
const { loadAdapter, loadModule } = require('../lib/Adapters/AdapterLoader');
const FilesAdapter = require('@parse/fs-files-adapter').default;
const ParsePushAdapter = require('@parse/push-adapter').default;
const MockFilesAdapter = require('mock-files-adapter');
const Config = require('../lib/Config');
@@ -103,19 +102,19 @@ describe('AdapterLoader', () => {
done();
});
it('should load push adapter from options', done => {
it('should load push adapter from options', async () => {
const options = {
android: {
senderId: 'yolo',
apiKey: 'yolo',
},
};
const ParsePushAdapter = await loadModule('@parse/push-adapter');
expect(() => {
const adapter = loadAdapter(undefined, ParsePushAdapter, options);
expect(adapter.constructor).toBe(ParsePushAdapter);
expect(adapter).not.toBe(undefined);
}).not.toThrow();
done();
});
it('should load custom push adapter from string (#3544)', done => {