Skip to content

Commit 37daafc

Browse files
Arthur Cinaderflovilmart
authored andcommitted
Add strip whitespace and trailing eol to spec too. (#3159)
1 parent 8359284 commit 37daafc

19 files changed

+38
-36
lines changed

spec/.eslintrc.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
},
3131
"rules": {
3232
"no-console": [0],
33-
"indent": ["error", 2]
33+
"indent": ["error", 2],
34+
"no-trailing-spaces": 2,
35+
"eol-last": 2
3436
}
35-
}
37+
}

spec/AccountLockoutPolicy.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ describe("Account Lockout Policy: ", () => {
263263
return isAccountLockoutError('username3', 'wrong password', 0.05, 1);
264264
})
265265
.then(() => {
266-
// account should still be locked even after 2 seconds.
266+
// account should still be locked even after 2 seconds.
267267
return isAccountLockoutError('username3', 'wrong password', 0.05, 2000);
268268
})
269269
.then(() => {
@@ -297,7 +297,7 @@ describe("Account Lockout Policy: ", () => {
297297
return loginWithWrongCredentialsShouldFail('username4', 'wrong password');
298298
})
299299
.then(() => {
300-
// allow locked user to login after 3 seconds with a valid userid and password
300+
// allow locked user to login after 3 seconds with a valid userid and password
301301
return new Promise((resolve, reject) => {
302302
setTimeout(() => {
303303
Parse.User.logIn('username4', 'correct password')

spec/Analytics.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const analyticsAdapter = {
2-
appOpened: function() {},
2+
appOpened: function() {},
33
trackEvent: function() {}
44
}
55

66
describe('AnalyticsController', () => {
77
it('should track a simple event', (done) => {
8-
8+
99
spyOn(analyticsAdapter, 'trackEvent').and.callThrough();
1010
reconfigureServer({
1111
analyticsAdapter
@@ -31,9 +31,9 @@ describe('AnalyticsController', () => {
3131
done();
3232
})
3333
});
34-
34+
3535
it('should track a app opened event', (done) => {
36-
36+
3737
spyOn(analyticsAdapter, 'appOpened').and.callThrough();
3838
reconfigureServer({
3939
analyticsAdapter
@@ -58,4 +58,4 @@ describe('AnalyticsController', () => {
5858
done();
5959
})
6060
})
61-
})
61+
})

spec/ClientSDK.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ describe('ClientSDK', () => {
2020
version: '1.9.0'
2121
});
2222
});
23-
23+
2424
it('should properly sastisfy', () => {
2525
expect(ClientSDK.compatible({
2626
js: '>=1.9.0'
2727
})("js1.9.0")).toBe(true);
28-
28+
2929
expect(ClientSDK.compatible({
3030
js: '>=1.9.0'
3131
})("js2.0.0")).toBe(true);
@@ -38,4 +38,4 @@ describe('ClientSDK', () => {
3838
js: '>=1.9.0'
3939
})(undefined)).toBe(true);
4040
})
41-
})
41+
})

spec/HTTPRequest.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ describe("httpRequest", () => {
272272
Parse._encode(httpResponse);
273273
let serialized = JSON.stringify(httpResponse);
274274
let result = JSON.parse(serialized);
275-
275+
276276
expect(httpResponse.text).toEqual('{"foo":"bar"}');
277277
expect(httpResponse.data).toEqual({foo: 'bar'});
278278
expect(httpResponse.body).toEqual({foo: 'bar'});

spec/Middlewares.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ describe('middlewares', () => {
120120
});
121121
});
122122
});
123-
});
123+
});

spec/MongoStorageAdapter.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
192192

193193
it("handles updating a single object with array, object date", (done) => {
194194
let adapter = new MongoStorageAdapter({ uri: databaseURI });
195-
195+
196196
let schema = { fields: {
197197
array: { type: 'Array' },
198198
object: { type: 'Object' },
199199
date: { type: 'Date' },
200200
} };
201201

202-
202+
203203
adapter.createObject('MyClass', schema, {})
204204
.then(() => adapter._rawFind('MyClass', {}))
205205
.then(results => {

spec/MongoTransform.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ describe('parseObjectToMongoObjectForCreate', () => {
242242
};
243243
var output = transform.parseObjectToMongoObjectForCreate(null, input, {
244244
fields: {
245-
aRelation: { __type: 'Relation', className: 'Stuff' },
245+
aRelation: { __type: 'Relation', className: 'Stuff' },
246246
},
247247
});
248248
expect(output).toEqual({});
@@ -302,7 +302,7 @@ describe('transformUpdate', () => {
302302
};
303303
var output = transform.transformUpdate(null, input, {
304304
fields: {
305-
aRelation: { __type: 'Relation', className: 'Stuff' },
305+
aRelation: { __type: 'Relation', className: 'Stuff' },
306306
},
307307
});
308308
expect(output).toEqual({});

spec/ParseInstallation.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ describe('Installations', () => {
288288
expect(results.length).toEqual(1);
289289
expect(results[0]['_id']).toEqual(secondObject._id);
290290
done();
291-
}).catch((error) => {
292-
jfail(error);
293-
done();
291+
}).catch((error) => {
292+
jfail(error);
293+
done();
294294
});
295295
});
296296

spec/ParseLiveQueryServer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ describe('ParseLiveQueryServer', function() {
928928
}
929929
}
930930
});
931-
931+
932932
parseLiveQueryServer._matchesACL(acl, client, requestId).then(function(isMatched) {
933933
expect(isMatched).toBe(false);
934934
done();

0 commit comments

Comments
 (0)