fix(prettier): Properly handle lint-stage files (#6970)
Now handles top level files and recursive files in folders. Set max line length to be 100
This commit is contained in:
@@ -106,17 +106,11 @@ describe('ParseServerRESTController', () => {
|
||||
spyOn(router, 'tryRouteRequest').and.callThrough();
|
||||
RESTController = ParseServerRESTController(Parse.applicationId, router);
|
||||
const resp = await RESTController.request('POST', '/classes/MyObject');
|
||||
const {
|
||||
status,
|
||||
response,
|
||||
location,
|
||||
} = await router.tryRouteRequest.calls.all()[0].returnValue;
|
||||
const { status, response, location } = await router.tryRouteRequest.calls.all()[0].returnValue;
|
||||
|
||||
expect(status).toBe(201);
|
||||
expect(response).toEqual(resp);
|
||||
expect(location).toBe(
|
||||
`http://localhost:8378/1/classes/MyObject/${resp.objectId}`
|
||||
);
|
||||
expect(location).toBe(`http://localhost:8378/1/classes/MyObject/${resp.objectId}`);
|
||||
});
|
||||
|
||||
it('should handle response status in batch', async () => {
|
||||
@@ -229,9 +223,10 @@ describe('ParseServerRESTController', () => {
|
||||
expect(databaseAdapter.createObject.calls.argsFor(0)[3]).toBe(
|
||||
databaseAdapter.createObject.calls.argsFor(1)[3]
|
||||
);
|
||||
expect(
|
||||
results.map(result => result.get('key')).sort()
|
||||
).toEqual(['value1', 'value2']);
|
||||
expect(results.map(result => result.get('key')).sort()).toEqual([
|
||||
'value1',
|
||||
'value2',
|
||||
]);
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -508,10 +503,7 @@ describe('ParseServerRESTController', () => {
|
||||
|
||||
const query = new Parse.Query('MyObject');
|
||||
const results = await query.find();
|
||||
expect(results.map(result => result.get('key')).sort()).toEqual([
|
||||
'value1',
|
||||
'value2',
|
||||
]);
|
||||
expect(results.map(result => result.get('key')).sort()).toEqual(['value1', 'value2']);
|
||||
|
||||
const query2 = new Parse.Query('MyObject2');
|
||||
const results2 = await query2.find();
|
||||
@@ -519,10 +511,7 @@ describe('ParseServerRESTController', () => {
|
||||
|
||||
const query3 = new Parse.Query('MyObject3');
|
||||
const results3 = await query3.find();
|
||||
expect(results3.map(result => result.get('key')).sort()).toEqual([
|
||||
'value1',
|
||||
'value2',
|
||||
]);
|
||||
expect(results3.map(result => result.get('key')).sort()).toEqual(['value1', 'value2']);
|
||||
|
||||
expect(databaseAdapter.createObject.calls.count()).toBe(13);
|
||||
let transactionalSession;
|
||||
@@ -653,11 +642,7 @@ describe('ParseServerRESTController', () => {
|
||||
password: 'world',
|
||||
}).then(
|
||||
() => {
|
||||
jfail(
|
||||
new Error(
|
||||
'Success callback should not be called when passing an empty username.'
|
||||
)
|
||||
);
|
||||
jfail(new Error('Success callback should not be called when passing an empty username.'));
|
||||
done();
|
||||
},
|
||||
err => {
|
||||
@@ -674,11 +659,7 @@ describe('ParseServerRESTController', () => {
|
||||
password: '',
|
||||
}).then(
|
||||
() => {
|
||||
jfail(
|
||||
new Error(
|
||||
'Success callback should not be called when passing an empty password.'
|
||||
)
|
||||
);
|
||||
jfail(new Error('Success callback should not be called when passing an empty password.'));
|
||||
done();
|
||||
},
|
||||
err => {
|
||||
|
||||
Reference in New Issue
Block a user