refactor: code style fixes with prettier and lint (#8208)

This commit is contained in:
dblythy
2022-10-03 22:55:05 +11:00
committed by GitHub
parent 63d51fa6c8
commit 2a82d19dbd
3 changed files with 8 additions and 8 deletions

View File

@@ -1244,11 +1244,11 @@ describe('Installations', () => {
deviceToken: '11433856eed2f1285fb3aa11136718c1198ed5647875096952c66bf8cb976306',
deviceType: 'ios',
};
await rest.create(config, auth.nobody(config), '_Installation', input)
await rest.create(config, auth.nobody(config), '_Installation', input);
const functions = {
beforeSave() {},
afterSave() {}
}
afterSave() {},
};
spyOn(functions, 'beforeSave').and.callThrough();
spyOn(functions, 'afterSave').and.callThrough();
Parse.Cloud.beforeSave(Parse.Installation, functions.beforeSave);
@@ -1283,7 +1283,7 @@ describe('Installations', () => {
},
});
await new Promise(resolve => setTimeout(resolve, 1000));
const installation = await new Parse.Query(Parse.Installation).first({useMasterKey: true});
const installation = await new Parse.Query(Parse.Installation).first({ useMasterKey: true });
expect(installation.get('badge')).toEqual(3);
expect(functions.beforeSave).not.toHaveBeenCalled();
expect(functions.afterSave).not.toHaveBeenCalled();

View File

@@ -469,8 +469,8 @@ describe('server', () => {
});
it('fails if default limit is wrong type', async () => {
for (const value of ["invalid", {}, [], true]) {
await expectAsync(reconfigureServer({ defaultLimit: value})).toBeRejectedWith(
for (const value of ['invalid', {}, [], true]) {
await expectAsync(reconfigureServer({ defaultLimit: value })).toBeRejectedWith(
'Default limit must be a number.'
);
}

View File

@@ -12,7 +12,7 @@ import {
PagesOptions,
SecurityOptions,
SchemaOptions,
ParseServerOptions
ParseServerOptions,
} from './Options/Definitions';
import { isBoolean, isString } from 'lodash';
@@ -458,7 +458,7 @@ export class Config {
static validateDefaultLimit(defaultLimit) {
if (defaultLimit == null) {
defaultLimit = ParseServerOptions.defaultLimit.default
defaultLimit = ParseServerOptions.defaultLimit.default;
}
if (typeof defaultLimit !== 'number') {
throw 'Default limit must be a number.';