Skip to content

Commit dabe3e2

Browse files
author
Arthur Cinader
committed
and here's what it looks like with a 1 line max
1 parent 134a750 commit dabe3e2

36 files changed

+1
-54
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"no-trailing-spaces": 2,
2020
"eol-last": 2,
2121
"space-in-parens": ["error", "never"],
22-
"no-multiple-empty-lines": 1
22+
"no-multiple-empty-lines": ["warn", { "max": 1 }]
2323
}
2424
}

spec/CacheController.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ describe('CacheController', function() {
1616
spyOn(FakeCacheAdapter, 'get').and.callThrough();
1717
});
1818

19-
2019
it('should expose role and user caches', (done) => {
2120
var cache = new CacheController(FakeCacheAdapter, FakeAppID);
2221

@@ -28,7 +27,6 @@ describe('CacheController', function() {
2827
done();
2928
});
3029

31-
3230
['role', 'user'].forEach((cacheName) => {
3331
it('should prefix ' + cacheName + ' cache', () => {
3432
var cache = new CacheController(FakeCacheAdapter, FakeAppID)[cacheName];

spec/Client.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ describe('Client', function() {
7676
expect(client.subscriptionInfos.size).toBe(0);
7777
});
7878

79-
8079
it('can generate ParseObject JSON with null selected field', function() {
8180
var parseObjectJSON = {
8281
key : 'value',

spec/FilesController.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ var GridStoreAdapter = require("../src/Adapters/Files/GridStoreAdapter").GridSto
22
var Config = require("../src/Config");
33
var FilesController = require('../src/Controllers/FilesController').default;
44

5-
65
// Small additional tests to improve overall coverage
76
describe("FilesController",() =>{
87
it("should properly expand objects", (done) => {

spec/GridStoreAdapter.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var GridStoreAdapter = require("../src/Adapters/Files/GridStoreAdapter").GridSto
55
var Config = require("../src/Config");
66
var FilesController = require('../src/Controllers/FilesController').default;
77

8-
98
// Small additional tests to improve overall coverage
109
describe_only_db('mongo')("GridStoreAdapter",() =>{
1110
it("should properly instanciate the GridStore when deleting a file", (done) => {
@@ -31,7 +30,6 @@ describe_only_db('mongo')("GridStoreAdapter",() =>{
3130
return originalUnlink.call(this);
3231
};
3332

34-
3533
filesController.createFile(config, 'myFilename.txt', 'my file content', 'text/plain')
3634
.then(myFile => {
3735

spec/HTTPRequest.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ app.get('/qs', function(req, res){
3535

3636
app.listen(13371);
3737

38-
3938
describe("httpRequest", () => {
4039
it("should do /hello", (done) => {
4140
httpRequest({

spec/InMemoryCache.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const InMemoryCache = require('../src/Adapters/Cache/InMemoryCache').default;
22

3-
43
describe('InMemoryCache', function() {
54
var BASE_TTL = {
65
ttl: 10
@@ -13,7 +12,6 @@ describe('InMemoryCache', function() {
1312

1413
var VALUE = 'world';
1514

16-
1715
function wait(sleep) {
1816
return new Promise(function(resolve) {
1917
setTimeout(resolve, sleep);

spec/Middlewares.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ describe('middlewares', () => {
6565
expect(fakeRes.status).toHaveBeenCalledWith(403);
6666
});
6767

68-
6968
it('should succeed when any one of the configured keys supplied', (done) => {
7069
AppCache.put(fakeReq.body._ApplicationId, {
7170
clientKey: 'clientKey',

spec/MongoStorageAdapter.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
199199
date: { type: 'Date' },
200200
} };
201201

202-
203202
adapter.createObject('MyClass', schema, {})
204203
.then(() => adapter._rawFind('MyClass', {}))
205204
.then(results => {

spec/OAuth.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ describe('OAuth', function() {
7474
done();
7575
});
7676

77-
7877
function validateCannotAuthenticateError(data, done) {
7978
jequal(typeof data, "object");
8079
jequal(typeof data.errors, "object");
@@ -325,5 +324,4 @@ describe('OAuth', function() {
325324
});
326325
});
327326

328-
329327
})

spec/ParseFile.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ describe('Parse.File testing', () => {
3636
});
3737
});
3838

39-
4039
it('works with _ContentType', done => {
4140

4241
request.post({

spec/ParseHooks.spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ describe('Hooks', () => {
238238
});
239239
});
240240

241-
242241
it("should fail trying to create a malformed function", (done) => {
243242
Parse.Hooks.createFunction("MyFunction").then((res) => {
244243
fail(res);
@@ -268,7 +267,6 @@ describe('Hooks', () => {
268267
})
269268
});
270269

271-
272270
it("should create hooks and properly preload them", (done) => {
273271

274272
var promises = [];
@@ -410,7 +408,6 @@ describe('Hooks', () => {
410408
});
411409
});
412410

413-
414411
it("should run the beforeSave hook on the test server", (done) => {
415412
var triggerCount = 0;
416413
app.post("/BeforeSaveSome", function(req, res) {

spec/ParseObject.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,6 @@ describe('Parse.Object testing', () => {
18301830
});
18311831
});
18321832

1833-
18341833
it("should create nested keys with _", done => {
18351834
const object = new Parse.Object("AnObject");
18361835
object.set("foo", {

spec/ParseQuery.spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ describe('Parse.Query testing', () => {
4141
var cake2 = new Cake();
4242
var cake3 = new Cake();
4343

44-
4544
user.signUp().then(function(){
4645
return user1.signUp();
4746
}).then(function(){
@@ -544,7 +543,6 @@ describe('Parse.Query testing', () => {
544543
});
545544
});
546545

547-
548546
it("objectId containedIn queries", function(done) {
549547
var makeBoxedNumber = function(i) {
550548
return new BoxedNumber({ number: i });
@@ -2453,7 +2451,6 @@ describe('Parse.Query testing', () => {
24532451
var matchRelationshipB = new Parse.Query("_User");
24542452
matchRelationshipB.matchesKeyInQuery("objectId", "userBObjectId", matchOr);
24552453

2456-
24572454
var orQuery = Parse.Query.or(objIdQuery, blockedUserQuery, matchRelationshipA, matchRelationshipB);
24582455
var query = new Parse.Query("_User");
24592456
query.doesNotMatchQuery("objectId", orQuery);

spec/ParseRelation.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ describe('Parse.Relation testing', () => {
163163
});
164164
});
165165

166-
167166
it_exclude_dbs(['postgres'])("queries with relations", (done) => {
168167

169168
var ChildObject = Parse.Object.extend("ChildObject");
@@ -421,7 +420,6 @@ describe('Parse.Relation testing', () => {
421420
});
422421
});
423422

424-
425423
it("Get query on relation using un-fetched parent object", (done) => {
426424
// Setup data model
427425
var Wheel = Parse.Object.extend('Wheel');

spec/ParseUser.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ describe('Parse.User testing', () => {
748748
});
749749
});
750750

751-
752751
it("user loaded from localStorage from login", (done) => {
753752
var id;
754753
Parse.User.signUp("alice", "password").then((alice) => {
@@ -2562,7 +2561,6 @@ describe('Parse.User testing', () => {
25622561
});
25632562
});
25642563

2565-
25662564
it('should aftersave with full object', (done) => {
25672565
var hit = 0;
25682566
Parse.Cloud.afterSave('_User', (req, res) => {

spec/PasswordPolicy.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,6 @@ describe("Password Policy: ", () => {
11341134
});
11351135
});
11361136

1137-
11381137
it('should fail if the new password is same as the previous one', done => {
11391138
const user = new Parse.User();
11401139

spec/PointerPermissions.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ describe('Pointer Permissions', () => {
4545
});
4646
});
4747

48-
4948
it('should work with write', (done) => {
5049
let config = new Config(Parse.applicationId);
5150
let user = new Parse.User();
@@ -614,7 +613,6 @@ describe('Pointer Permissions', () => {
614613
})
615614
});
616615

617-
618616
it('should let master key update objects', (done) => {
619617
let config = new Config(Parse.applicationId);
620618
let object = new Parse.Object('AnObject');

spec/UserPII.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ describe('Personally Identifiable Information', () => {
6363
});
6464
});
6565

66-
6766
it('should be able to get own PII via API with Find', (done) => {
6867
new Parse.Query(Parse.User)
6968
.first()
@@ -101,7 +100,6 @@ describe('Personally Identifiable Information', () => {
101100
);
102101
});
103102

104-
105103
it('should be able to get own PII via API with Get', (done) => {
106104
new Parse.Query(Parse.User)
107105
.get(user.id)
@@ -304,7 +302,6 @@ describe('Personally Identifiable Information', () => {
304302
});
305303
});
306304

307-
308305
it('should be able to get own PII via API with Find', (done) => {
309306
new Parse.Query(Parse.User)
310307
.first()
@@ -342,7 +339,6 @@ describe('Personally Identifiable Information', () => {
342339
);
343340
});
344341

345-
346342
it('should be able to get own PII via API with Get', (done) => {
347343
new Parse.Query(Parse.User)
348344
.get(user.id)

spec/helper.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ function mockFacebook() {
369369
return mockFacebookAuthenticator('8675309', 'jenny');
370370
}
371371

372-
373372
// This is polluting, but, it makes it way easier to directly port old tests.
374373
global.Parse = Parse;
375374
global.TestObject = TestObject;
@@ -419,7 +418,6 @@ global.describe_only_db = db => {
419418
}
420419
}
421420

422-
423421
var libraryCache = {};
424422
jasmine.mockLibrary = function(library, name, mock) {
425423
var original = require(library)[name];

src/Adapters/Cache/InMemoryCache.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const DEFAULT_CACHE_TTL = 5 * 1000;
22

3-
43
export class InMemoryCache {
54
constructor({
65
ttl = DEFAULT_CACHE_TTL

src/Adapters/Storage/Mongo/MongoSchemaCollection.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ function _mongoSchemaQueryFromNameQuery(name: string, query) {
8282
return object;
8383
}
8484

85-
8685
// Returns a type suitable for inserting into mongo _SCHEMA collection.
8786
// Does no validation. That is expected to be done in Parse Server.
8887
function parseFieldTypeToMongoFieldType({ type, targetClass }) {

src/Adapters/Storage/Mongo/MongoStorageAdapter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ const mongoSchemaFromFieldsAndClassNameAndCLP = (fields, className, classLevelPe
7676
return mongoObject;
7777
}
7878

79-
8079
export class MongoStorageAdapter {
8180
// Private
8281
_uri: string;

src/Adapters/Storage/Mongo/MongoTransform.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ const addLegacyACL = restObject => {
422422
return restObjectCopy;
423423
}
424424

425-
426425
// A sentinel value that helper transformations return when they
427426
// cannot perform a transformation
428427
function CannotTransform() {}

src/Auth.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ function nobody(config) {
3939
return new Auth({ config, isMaster: false });
4040
}
4141

42-
4342
// Returns a promise that resolves to an Auth object
4443
var getAuthForSessionToken = function({ config, sessionToken, installationId } = {}) {
4544
return config.cacheController.user.get(sessionToken).then((userJSON) => {

src/Controllers/CacheController.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export class SubCache {
3939
}
4040
}
4141

42-
4342
export class CacheController extends AdaptableController {
4443

4544
constructor(adapter, appId, options = {}) {

src/LiveQuery/QueryTools.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ function equalObjectsGeneric(obj, compareTo, eqlFn) {
125125
return eqlFn(obj, compareTo);
126126
}
127127

128-
129128
/**
130129
* Determines whether an object matches a single key's constraints
131130
*/

src/PromiseRouter.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function validateParameter(key, value) {
2525
}
2626
}
2727

28-
2928
export default class PromiseRouter {
3029
// Each entry should be an object with:
3130
// path: the path to route, in express format
@@ -195,7 +194,6 @@ function makeExpressHandler(appId, promiseHandler) {
195194
}
196195
}
197196

198-
199197
function maskSensitiveUrl(req) {
200198
let maskUrl = req.originalUrl.toString();
201199
let shouldMaskUrl = req.method === 'GET' && req.originalUrl.includes('/login')

src/RestWrite.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ RestWrite.prototype.findUsersWithAuthData = function(authData) {
274274
return findPromise;
275275
}
276276

277-
278277
RestWrite.prototype.handleAuthData = function(authData) {
279278
let results;
280279
return this.handleAuthDataValidation(authData).then(() => {
@@ -340,7 +339,6 @@ RestWrite.prototype.handleAuthData = function(authData) {
340339
});
341340
}
342341

343-
344342
// The non-third-party parts of User transformation
345343
RestWrite.prototype.transformUser = function() {
346344
var promise = Promise.resolve();
@@ -443,7 +441,6 @@ RestWrite.prototype._validatePasswordPolicy = function() {
443441
});
444442
};
445443

446-
447444
RestWrite.prototype._validatePasswordRequirements = function() {
448445
// check if the password conforms to the defined password policy if configured
449446
const policyError = 'Password does not meet the Password Policy requirements.';

src/Routers/AnalyticsRouter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ function trackEvent(req) {
1111
return analyticsController.trackEvent(req);
1212
}
1313

14-
1514
export class AnalyticsRouter extends PromiseRouter {
1615
mountRoutes() {
1716
this.route('POST','/events/AppOpened', appOpened);

src/Routers/IAPValidationRouter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ function getFileForProductIdentifier(productIdentifier, req) {
5555
});
5656
}
5757

58-
5958
export class IAPValidationRouter extends PromiseRouter {
6059

6160
handleRequest(req) {

src/Routers/UsersRouter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ export class UsersRouter extends ClassesRouter {
228228
});
229229
}
230230

231-
232231
mountRoutes() {
233232
this.route('GET', '/users', req => { return this.handleFind(req); });
234233
this.route('POST', '/users', req => { return this.handleCreate(req); });

0 commit comments

Comments
 (0)