Skip to content

Removes all import / exports #4864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/AdaptableController.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

const AdaptableController = require("../src/Controllers/AdaptableController").AdaptableController;
const FilesAdapter = require("../src/Adapters/Files/FilesAdapter").default;
const FilesController = require("../src/Controllers/FilesController").FilesController;
const { AdaptableController } = require("../src/Controllers/AdaptableController");
const { FilesAdapter } = require("../src/Adapters/Files/FilesAdapter");
const { FilesController } = require("../src/Controllers/FilesController");

const MockController = function(options) {
AdaptableController.call(this, options);
Expand Down
6 changes: 3 additions & 3 deletions spec/AdapterLoader.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

const loadAdapter = require("../src/Adapters/AdapterLoader").loadAdapter;
const FilesAdapter = require("@parse/fs-files-adapter").default;
const S3Adapter = require("@parse/s3-files-adapter").default;
const ParsePushAdapter = require("@parse/push-adapter").default;
const FilesAdapter = require("@parse/fs-files-adapter");
const S3Adapter = require("@parse/s3-files-adapter");
const ParsePushAdapter = require("@parse/push-adapter").ParsePushAdapter;
const Config = require('../src/Config');

describe("AdapterLoader", ()=>{
Expand Down
6 changes: 3 additions & 3 deletions spec/AuthenticationAdapters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ describe('AuthenticationProviders', function() {
expect(appIdSpy).not.toHaveBeenCalled();
done();
}, (err) => {
jfail(err);
done.fail(err);
done();
})
});
Expand All @@ -296,7 +296,7 @@ describe('AuthenticationProviders', function() {
}).then(() => {
done();
}, (err) => {
jfail(err);
done.fail(err);
done();
})
});
Expand All @@ -315,7 +315,7 @@ describe('AuthenticationProviders', function() {
}).then(() => {
done();
}, (err) => {
jfail(err);
done.fail(err);
done();
})
});
Expand Down
6 changes: 3 additions & 3 deletions spec/CLI.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
import commander from '../src/cli/utils/commander';
import definitions from '../src/cli/definitions/parse-server';
import liveQueryDefinitions from '../src/cli/definitions/parse-live-query-server';
const commander = require('../src/cli/utils/commander');
const { definitions } = require('../src/cli/definitions/parse-server');
const { liveQueryDefinitions } = require('../src/cli/definitions/parse-live-query-server');

const testDefinitions = {
'arg0': 'PROGRAM_ARG_0',
Expand Down
2 changes: 1 addition & 1 deletion spec/CacheController.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CacheController = require('../src/Controllers/CacheController.js').default;
const { CacheController } = require('../src/Controllers/CacheController.js');

describe('CacheController', function() {
let FakeCacheAdapter;
Expand Down
13 changes: 6 additions & 7 deletions spec/CloudCode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ describe('Cloud Code', () => {
expect(aBeforeSaveObj.get('remove')).toEqual(undefined);
done();
}).catch((err) => {
jfail(err);
done.fail(err);
done();
});
});
Expand Down Expand Up @@ -1007,7 +1007,7 @@ describe('Cloud Code', () => {
expect(object.get('remove')).toBeUndefined();
done();
}).fail((err) => {
jfail(err);
done.fail(err);
done();
});
});
Expand All @@ -1032,7 +1032,7 @@ describe('Cloud Code', () => {
expect(() => { objectAgain.relation('testsRelation') }).not.toThrow();
done();
}).fail((err) => {
jfail(err);
done.fail(err);
done();
})
});
Expand Down Expand Up @@ -1200,7 +1200,7 @@ describe('Cloud Code', () => {
done();
}).catch(err => {
console.error(err);
jfail(err);
done.fail(err);
done();
});
});
Expand All @@ -1227,7 +1227,7 @@ describe('Cloud Code', () => {
expect(jobStatus.get('status')).toEqual('failed');
done();
}).catch(err => {
jfail(err);
done.fail(err);
done();
});
});
Expand Down Expand Up @@ -1838,8 +1838,7 @@ describe('afterFind hooks', () => {
}).then((results) => {
expect(results[0].objectId).toEqual(null);
expect(hook.method).not.toHaveBeenCalled();
done();
});
}).then(done).catch(done.fail)
});

it('should skip afterFind hooks for distinct', (done) => {
Expand Down
61 changes: 23 additions & 38 deletions spec/EmailVerificationToken.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ describe("Email Verification Token Expiration: ", () => {
done();
});
}, 1000);
}).catch((err) => {
jfail(err);
done();
});
}).catch(done.fail);
});

it('emailVerified should set to false, if the user does not verify their email before the email verify token expires', done => {
Expand Down Expand Up @@ -84,13 +81,13 @@ describe("Email Verification Token Expiration: ", () => {
done();
})
.catch(() => {
jfail(error);
done.fail(error);
done();
});
});
}, 1000);
}).catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -126,7 +123,7 @@ describe("Email Verification Token Expiration: ", () => {
done();
});
}).catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -164,12 +161,12 @@ describe("Email Verification Token Expiration: ", () => {
done();
})
.catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
}).catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -208,12 +205,12 @@ describe("Email Verification Token Expiration: ", () => {
done();
})
.catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
}).catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -256,7 +253,7 @@ describe("Email Verification Token Expiration: ", () => {
done();
})
.catch(error => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -301,16 +298,10 @@ describe("Email Verification Token Expiration: ", () => {
expect(typeof user._email_verify_token_expires_at).toBe('undefined');
done();
})
.catch(error => {
jfail(error);
done();
});
.catch(done.fail);
});
})
.catch(error => {
jfail(error);
done();
});
.catch(done.fail);
});

it('clicking on the email verify link by an email VERIFIED user that was setup before enabling the expire email verify token should show email verify email success', done => {
Expand Down Expand Up @@ -364,7 +355,7 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -414,7 +405,7 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -477,10 +468,7 @@ describe("Email Verification Token Expiration: ", () => {
expect(sendEmailOptions).toBeDefined();
done();
})
.catch((error) => {
jfail(error);
done();
});
.catch(done.fail);
});

it('should send a new verification email when a resend is requested and the user is UNVERIFIED', done => {
Expand Down Expand Up @@ -553,10 +541,7 @@ describe("Email Verification Token Expiration: ", () => {
expect(userBeforeRequest._email_verify_token_expires_at).not.toEqual(userAfterRequest.__email_verify_token_expires_at);
done();
})
.catch(error => {
jfail(error);
done();
});
.catch(done.fail);
});

it('should not send a new verification email when a resend is requested and the user is VERIFIED', done => {
Expand Down Expand Up @@ -618,7 +603,7 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch(error => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -663,7 +648,7 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch(error => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -707,7 +692,7 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch(error => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -751,7 +736,7 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch(error => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -789,12 +774,12 @@ describe("Email Verification Token Expiration: ", () => {
done();
})
.catch(error => {
jfail(error);
done.fail(error);
done();
});

}).catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down Expand Up @@ -848,12 +833,12 @@ describe("Email Verification Token Expiration: ", () => {
});
})
.catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
}).catch((error) => {
jfail(error);
done.fail(error);
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion spec/FilesController.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const LoggerController = require('../src/Controllers/LoggerController').LoggerCo
const WinstonLoggerAdapter = require('../src/Adapters/Logger/WinstonLoggerAdapter').WinstonLoggerAdapter;
const GridStoreAdapter = require("../src/Adapters/Files/GridStoreAdapter").GridStoreAdapter;
const Config = require("../src/Config");
const FilesController = require('../src/Controllers/FilesController').default;
const FilesController = require('../src/Controllers/FilesController').FilesController;

const mockAdapter = {
createFile: () => {
Expand Down
2 changes: 1 addition & 1 deletion spec/GridStoreAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const GridStore = require("mongodb").GridStore;

const GridStoreAdapter = require("../src/Adapters/Files/GridStoreAdapter").GridStoreAdapter;
const Config = require("../src/Config");
const FilesController = require('../src/Controllers/FilesController').default;
const FilesController = require('../src/Controllers/FilesController').FilesController;


// Small additional tests to improve overall coverage
Expand Down
2 changes: 1 addition & 1 deletion spec/HTTPRequest.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const httpRequest = require("../src/cloud-code/httpRequest"),
HTTPResponse = require('../src/cloud-code/HTTPResponse').default,
HTTPResponse = require('../src/cloud-code/HTTPResponse'),
bodyParser = require('body-parser'),
express = require("express");

Expand Down
2 changes: 1 addition & 1 deletion spec/InMemoryCache.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const InMemoryCache = require('../src/Adapters/Cache/InMemoryCache').default;
const InMemoryCache = require('../src/Adapters/Cache/InMemoryCache').InMemoryCache;


describe('InMemoryCache', function() {
Expand Down
2 changes: 1 addition & 1 deletion spec/InMemoryCacheAdapter.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const InMemoryCacheAdapter = require('../src/Adapters/Cache/InMemoryCacheAdapter').default;
const InMemoryCacheAdapter = require('../src/Adapters/Cache/InMemoryCacheAdapter').InMemoryCacheAdapter;

describe('InMemoryCacheAdapter', function() {
const KEY = 'hello';
Expand Down
2 changes: 1 addition & 1 deletion spec/InstallationsRouter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('InstallationsRouter', () => {
expect(results.length).toEqual(1);
done();
}).catch((err) => {
jfail(err);
done.fail(err);
done();
});
});
Expand Down
4 changes: 2 additions & 2 deletions spec/LoggerController.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('LoggerController', () => {
expect(res.length).not.toBe(0);
done();
}).catch((err) => {
jfail(err);
done.fail(err);
done();
})
}).not.toThrow();
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('LoggerController', () => {
expect(res.length).toBe(0);
done();
}).catch((err) => {
jfail(err);
done.fail(err);
fail("should not fail");
done();
})
Expand Down
2 changes: 1 addition & 1 deletion spec/MongoSchemaCollectionAdapter.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const MongoSchemaCollection = require('../src/Adapters/Storage/Mongo/MongoSchemaCollection').default;
const MongoSchemaCollection = require('../src/Adapters/Storage/Mongo/MongoSchemaCollection').MongoSchemaCollection;

describe('MongoSchemaCollection', () => {
it('can transform legacy _client_permissions keys to parse format', done => {
Expand Down
Loading