mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[MIGRATION] - Fixed lint errors for empty function
This commit is contained in:
@@ -22,7 +22,7 @@ import { BpmAuthMock, EcmAuthMock, OAuthMock } from './mockObjects';
|
||||
describe('Basic configuration test', () => {
|
||||
describe('config parameter ', () => {
|
||||
it('Should basePath have a default value', () => {
|
||||
const alfrescoJsApi = new AlfrescoApi({});
|
||||
const alfrescoJsApi = new AlfrescoApi({ /* empty */ });
|
||||
|
||||
assert.equal(alfrescoJsApi.contentClient.basePath, 'http://127.0.0.1:8080/alfresco/api/-default-/public/alfresco/versions/1');
|
||||
});
|
||||
|
@@ -29,7 +29,7 @@ describe('Bpm Auth test', () => {
|
||||
});
|
||||
|
||||
it('should remember username on login', () => {
|
||||
const auth = new ProcessAuth({});
|
||||
const auth = new ProcessAuth({ /* empty */ });
|
||||
auth.login('johndoe', 'password');
|
||||
assert.equal(auth.authentications.basicAuth.username, 'johndoe');
|
||||
});
|
||||
@@ -140,7 +140,7 @@ describe('Bpm Auth test', () => {
|
||||
});
|
||||
|
||||
processAuth.login('wrong', 'name').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
assert.equal(error.status, 401);
|
||||
done();
|
||||
@@ -159,7 +159,7 @@ describe('Bpm Auth test', () => {
|
||||
|
||||
const loginPromise = processAuth.login('wrong', 'name');
|
||||
|
||||
loginPromise.catch(() => {});
|
||||
loginPromise.catch(() => { /* empty */ });
|
||||
loginPromise.on('unauthorized', () => {
|
||||
done();
|
||||
});
|
||||
@@ -174,7 +174,7 @@ describe('Bpm Auth test', () => {
|
||||
});
|
||||
|
||||
const loginPromise = processAuth.login('wrong', 'name');
|
||||
loginPromise.catch(() => {});
|
||||
loginPromise.catch(() => { /* empty */ });
|
||||
loginPromise.on('forbidden', () => {
|
||||
done();
|
||||
});
|
||||
@@ -190,7 +190,7 @@ describe('Bpm Auth test', () => {
|
||||
|
||||
const loginPromise = processAuth.login('admin', 'admin');
|
||||
|
||||
loginPromise.catch(() => {});
|
||||
loginPromise.catch(() => { /* empty */ });
|
||||
loginPromise.on('success', () => {
|
||||
done();
|
||||
});
|
||||
|
@@ -52,7 +52,7 @@ describe('Categories', () => {
|
||||
it('should return 404 while getting subcategories for not existing category', (done) => {
|
||||
categoriesMock.get404SubcategoryNotExist('notExistingId');
|
||||
categoriesApi.getSubcategories('notExistingId').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -72,7 +72,7 @@ describe('Categories', () => {
|
||||
it('should return 404 while getting category with categoryId when category not exists', (done) => {
|
||||
categoriesMock.get404CategoryNotExist('notExistingId');
|
||||
categoriesApi.getCategory('notExistingId').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -92,7 +92,7 @@ describe('Categories', () => {
|
||||
it('should return 403 while getting categories linked to node with nodeId if user has no rights to get from node', (done) => {
|
||||
categoriesMock.get403NodeCategoryLinksPermissionDenied('testNode');
|
||||
categoriesApi.getCategoryLinksForNode('testNode').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 403);
|
||||
done();
|
||||
@@ -103,7 +103,7 @@ describe('Categories', () => {
|
||||
it('should return 404 while getting categories linked to node with nodeId if node does not exist', (done) => {
|
||||
categoriesMock.get404NodeNotExist('testNode');
|
||||
categoriesApi.getCategoryLinksForNode('testNode').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -121,7 +121,7 @@ describe('Categories', () => {
|
||||
it('should return 404 while unlinking category if category with categoryId or node with nodeId does not exist', (done) => {
|
||||
categoriesMock.get404CategoryUnlinkNotFound('testNode', 'testId1');
|
||||
categoriesApi.unlinkNodeFromCategory('testNode', 'testId1').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -132,7 +132,7 @@ describe('Categories', () => {
|
||||
it('should return 403 while unlinking category if user has no rights to unlink', (done) => {
|
||||
categoriesMock.get403CategoryUnlinkPermissionDenied('testNode', 'testId1');
|
||||
categoriesApi.unlinkNodeFromCategory('testNode', 'testId1').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 403);
|
||||
done();
|
||||
@@ -152,7 +152,7 @@ describe('Categories', () => {
|
||||
it('should return 404 while updating category if category with categoryId does not exist', (done) => {
|
||||
categoriesMock.get404CategoryUpdateNotFound('testId1');
|
||||
categoriesApi.updateCategory('testId1', { name: 'testName1' }).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -163,7 +163,7 @@ describe('Categories', () => {
|
||||
it('should return 403 while updating category if user has no rights to update', (done) => {
|
||||
categoriesMock.get403CategoryUpdatePermissionDenied('testId1');
|
||||
categoriesApi.updateCategory('testId1', { name: 'testName1' }).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 403);
|
||||
done();
|
||||
@@ -183,7 +183,7 @@ describe('Categories', () => {
|
||||
it('should return 409 while creating subcategory if subcategory already exists', (done) => {
|
||||
categoriesMock.get409CategoryCreateAlreadyExists('testId1');
|
||||
categoriesApi.createSubcategories('testId1', [{ name: 'testName10' }]).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 409);
|
||||
done();
|
||||
@@ -194,7 +194,7 @@ describe('Categories', () => {
|
||||
it('should return 403 while creating category if user has no rights to create', (done) => {
|
||||
categoriesMock.get403CategoryCreatedPermissionDenied('testId1');
|
||||
categoriesApi.createSubcategories('testId1', [{ name: 'testName10' }]).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 403);
|
||||
done();
|
||||
@@ -231,7 +231,7 @@ describe('Categories', () => {
|
||||
it('should return 404 while linking category if node with nodeId or category with categoryId does not exist', (done) => {
|
||||
categoriesMock.get404CategoryLinkNotFound('testNode');
|
||||
categoriesApi.linkNodeToCategory('testNode', [{ categoryId: 'testId1' }]).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -242,7 +242,7 @@ describe('Categories', () => {
|
||||
it('should return 403 while linking category if user has no rights to link', (done) => {
|
||||
categoriesMock.get403CategoryLinkPermissionDenied('testNode');
|
||||
categoriesApi.linkNodeToCategory('testNode', [{ categoryId: 'testId1' }]).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 403);
|
||||
done();
|
||||
@@ -253,7 +253,7 @@ describe('Categories', () => {
|
||||
it('should return 405 while linking category if node of this type cannot be assigned to category', (done) => {
|
||||
categoriesMock.get405CategoryLinkCannotAssign('testNode');
|
||||
categoriesApi.linkNodeToCategory('testNode', [{ categoryId: 'testId1' }]).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: { status: number }) => {
|
||||
assert.equal(error.status, 405);
|
||||
done();
|
||||
|
@@ -58,7 +58,7 @@ describe('Node', () => {
|
||||
nodeMock.get404ChildrenNotExist();
|
||||
|
||||
nodesApi.listNodeChildren('b4cff62a-664d-4d45-9302-98723eac1319').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -102,7 +102,7 @@ describe('Node', () => {
|
||||
nodeMock.get404DeleteNotFound();
|
||||
|
||||
nodesApi.deleteNode('80a94ac8-test-47ad-864e-5d939424c47c').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
@@ -114,7 +114,7 @@ describe('Node', () => {
|
||||
nodeMock.get403DeletePermissionDenied();
|
||||
|
||||
nodesApi.deleteNode('80a94ac8-3ece-47ad-864e-5d939424c47c').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
() => {
|
||||
done();
|
||||
}
|
||||
@@ -142,7 +142,7 @@ describe('Node', () => {
|
||||
nodeMock.get404DeleteNotFound();
|
||||
|
||||
nodesApi.deleteNodes(['80a94ac8-3ece-47ad-864e-5d939424c47c', '80a94ac8-test-47ad-864e-5d939424c47c']).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
assert.equal(error.status, 404);
|
||||
done();
|
||||
|
@@ -56,7 +56,7 @@ describe('Queries', () => {
|
||||
nodesMock.get401Response();
|
||||
|
||||
queriesApi.findNodes(searchTerm).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
() => {
|
||||
done();
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ describe('Tags', () => {
|
||||
tagMock.get401Response();
|
||||
|
||||
tagsApi.listTags().then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
() => {
|
||||
done();
|
||||
}
|
||||
|
@@ -80,7 +80,7 @@ describe('WebScript', () => {
|
||||
|
||||
const webscriptPromise: any = webscriptApi.executeWebScript('GET', scriptPath, null, contextRoot, servicePath);
|
||||
|
||||
webscriptPromise.catch(() => {});
|
||||
webscriptPromise.catch(() => { /* empty */ });
|
||||
webscriptPromise.on('success', () => {
|
||||
done();
|
||||
});
|
||||
@@ -91,7 +91,7 @@ describe('WebScript', () => {
|
||||
|
||||
const webscriptPromise: any = webscriptApi.executeWebScript('GET', scriptPath, null, contextRoot, servicePath);
|
||||
|
||||
webscriptPromise.catch(() => {});
|
||||
webscriptPromise.catch(() => { /* empty */ });
|
||||
webscriptPromise.on('error', () => {
|
||||
done();
|
||||
});
|
||||
@@ -102,7 +102,7 @@ describe('WebScript', () => {
|
||||
|
||||
const webscriptPromise: any = webscriptApi.executeWebScript('GET', scriptPath, null, contextRoot, servicePath);
|
||||
|
||||
webscriptPromise.catch(() => {});
|
||||
webscriptPromise.catch(() => { /* empty */ });
|
||||
webscriptPromise.on('unauthorized', () => {
|
||||
done();
|
||||
});
|
||||
|
@@ -43,13 +43,13 @@ describe('Ecm Auth test', () => {
|
||||
});
|
||||
|
||||
it('should remember username on login', () => {
|
||||
const auth = new ContentAuth({}, alfrescoJsApi);
|
||||
const auth = new ContentAuth({ /* empty */ }, alfrescoJsApi);
|
||||
auth.login('johndoe', 'password');
|
||||
assert.equal(auth.authentications.basicAuth.username, 'johndoe');
|
||||
});
|
||||
|
||||
it('should forget username on logout', (done) => {
|
||||
const auth = new ContentAuth({}, alfrescoJsApi);
|
||||
const auth = new ContentAuth({ /* empty */ }, alfrescoJsApi);
|
||||
|
||||
authEcmMock.get201Response();
|
||||
|
||||
@@ -120,7 +120,7 @@ describe('Ecm Auth test', () => {
|
||||
authEcmMock.get403Response();
|
||||
|
||||
contentAuth.login('wrong', 'name').then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error: any) => {
|
||||
assert.equal(error.status, 403);
|
||||
done();
|
||||
@@ -132,7 +132,7 @@ describe('Ecm Auth test', () => {
|
||||
authEcmMock.get400Response();
|
||||
|
||||
contentAuth.login(null, null).then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
assert.equal(error.status, 400);
|
||||
done();
|
||||
@@ -145,7 +145,7 @@ describe('Ecm Auth test', () => {
|
||||
authEcmMock.get401Response();
|
||||
|
||||
const loginPromise: any = contentAuth.login('wrong', 'name');
|
||||
loginPromise.catch(() => {});
|
||||
loginPromise.catch(() => { /* empty */ });
|
||||
|
||||
loginPromise.on('unauthorized', () => {
|
||||
done();
|
||||
@@ -157,7 +157,7 @@ describe('Ecm Auth test', () => {
|
||||
|
||||
const loginPromise: any = contentAuth.login('wrong', 'name');
|
||||
|
||||
loginPromise.catch(() => {});
|
||||
loginPromise.catch(() => { /* empty */ });
|
||||
|
||||
loginPromise.on('forbidden', () => {
|
||||
done();
|
||||
@@ -169,7 +169,7 @@ describe('Ecm Auth test', () => {
|
||||
|
||||
const loginPromise: any = contentAuth.login('admin', 'admin');
|
||||
|
||||
loginPromise.catch(() => {});
|
||||
loginPromise.catch(() => { /* empty */ });
|
||||
|
||||
loginPromise.on('success', () => {
|
||||
done();
|
||||
@@ -224,7 +224,7 @@ describe('Ecm Auth test', () => {
|
||||
it('Logout should be rejected if the Ticket is already expired', (done) => {
|
||||
authEcmMock.get404ResponseLogout();
|
||||
contentAuth.logout().then(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
assert.equal(error.error.toString(), 'Error: Not Found');
|
||||
done();
|
||||
|
@@ -24,7 +24,7 @@ const adminUser = {
|
||||
aspectNames: ['cm:ownable'],
|
||||
firstName: 'Administrator',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: 'admin',
|
||||
enabled: true,
|
||||
email: 'admin@alfresco.com',
|
||||
|
@@ -27,7 +27,7 @@ export class PeopleMock extends BaseMock {
|
||||
firstName: 'chewbacca',
|
||||
lastName: 'Chewbe',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: 'chewbe',
|
||||
enabled: true,
|
||||
email: 'chewbe@millenniumfalcon.com'
|
||||
@@ -54,7 +54,7 @@ export class PeopleMock extends BaseMock {
|
||||
lastName: '3PhtPlBO',
|
||||
jobTitle: 'N/A',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: '0jl2FBTc',
|
||||
enabled: true,
|
||||
email: 'owAwLISy'
|
||||
@@ -66,7 +66,7 @@ export class PeopleMock extends BaseMock {
|
||||
lastName: '748zEwJV',
|
||||
jobTitle: 'N/A',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: '0kd3jA3b',
|
||||
enabled: true,
|
||||
email: 'm1ooPRIu'
|
||||
@@ -78,7 +78,7 @@ export class PeopleMock extends BaseMock {
|
||||
lastName: 'GZK6IenG',
|
||||
jobTitle: 'N/A',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: '1BJSWj5u',
|
||||
enabled: true,
|
||||
email: 'UtKzKjje'
|
||||
@@ -90,7 +90,7 @@ export class PeopleMock extends BaseMock {
|
||||
lastName: 'OiLjkq9z',
|
||||
jobTitle: 'N/A',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: '1pvBqbmT',
|
||||
enabled: true,
|
||||
email: '72GemSCB'
|
||||
@@ -102,7 +102,7 @@ export class PeopleMock extends BaseMock {
|
||||
lastName: 'IHb5JiaR',
|
||||
jobTitle: 'N/A',
|
||||
emailNotificationsEnabled: true,
|
||||
company: {},
|
||||
company: { /* empty */ },
|
||||
id: '2fOamhbL',
|
||||
enabled: true,
|
||||
email: 'hhhQHpmZ'
|
||||
|
@@ -38,7 +38,7 @@ export class BpmAuthMock extends BaseMock {
|
||||
}
|
||||
|
||||
get200ResponseLogout(): void {
|
||||
nock(this.host, { encodedQueryParams: true }).get('/activiti-app/app/logout', {}).reply(200);
|
||||
nock(this.host, { encodedQueryParams: true }).get('/activiti-app/app/logout', { /* empty */ }).reply(200);
|
||||
}
|
||||
|
||||
get401Response(): void {
|
||||
|
@@ -151,8 +151,8 @@ export class ProcessMock extends BaseMock {
|
||||
javascriptEvents: [],
|
||||
className: '',
|
||||
style: '',
|
||||
customFieldTemplates: {},
|
||||
metadata: {},
|
||||
customFieldTemplates: { /* empty */ },
|
||||
metadata: { /* empty */ },
|
||||
variables: [],
|
||||
gridsterForm: false
|
||||
});
|
||||
|
@@ -43,7 +43,7 @@ const formValues = [
|
||||
export class TasksMock extends BaseMock {
|
||||
get200Response(): void {
|
||||
nock(this.host, { encodedQueryParams: true })
|
||||
.post('/activiti-app/api/enterprise/tasks/query', {})
|
||||
.post('/activiti-app/api/enterprise/tasks/query', { /* empty */ })
|
||||
.reply(200, {
|
||||
size: 2,
|
||||
total: 2,
|
||||
@@ -166,7 +166,7 @@ export class TasksMock extends BaseMock {
|
||||
}
|
||||
|
||||
get400TaskFilter(): void {
|
||||
nock(this.host, { encodedQueryParams: true }).post('/activiti-app/api/enterprise/tasks/filter', {}).reply(400, {
|
||||
nock(this.host, { encodedQueryParams: true }).post('/activiti-app/api/enterprise/tasks/filter', { /* empty */ }).reply(400, {
|
||||
message: 'A valid filterId or filter params must be provided',
|
||||
messageKey: 'GENERAL.ERROR.BAD-REQUEST'
|
||||
});
|
||||
@@ -1025,8 +1025,8 @@ export class TasksMock extends BaseMock {
|
||||
javascriptEvents: [],
|
||||
className: '',
|
||||
style: '',
|
||||
customFieldTemplates: {},
|
||||
metadata: {},
|
||||
customFieldTemplates: { /* empty */ },
|
||||
metadata: { /* empty */ },
|
||||
variables: [],
|
||||
gridsterForm: false
|
||||
});
|
||||
|
@@ -31,8 +31,8 @@ describe('Oauth2 test', () => {
|
||||
beforeEach(() => {
|
||||
const hostOauth2 = 'https://myOauthUrl:30081';
|
||||
const mockStorage = {
|
||||
getItem: () => {},
|
||||
setItem: () => {}
|
||||
getItem: () => { /* empty */ },
|
||||
setItem: () => { /* empty */ }
|
||||
};
|
||||
|
||||
oauth2Mock = new OAuthMock(hostOauth2);
|
||||
|
@@ -65,7 +65,7 @@ describe('Activiti Process Api', () => {
|
||||
it('get activiti Process list', (done) => {
|
||||
processMock.get200Response();
|
||||
|
||||
processInstancesApi.getProcessInstances({}).then((data) => {
|
||||
processInstancesApi.getProcessInstances({ /* empty */ }).then((data) => {
|
||||
assert.equal(data.data[0].name, 'Process Test Api - July 26th 2016');
|
||||
assert.equal(data.data[1].name, 'Process Test Api - July 26th 2016');
|
||||
done();
|
||||
|
@@ -130,7 +130,7 @@ describe('Activiti Process Instance Variables Api', () => {
|
||||
const variableName = 'var1';
|
||||
variablesMock.addUpdateProcessInstanceVariable200Response(processInstanceId, variableName);
|
||||
|
||||
processInstanceVariablesApi.updateProcessInstanceVariable(processInstanceId, variableName, {}).then(() => {
|
||||
processInstanceVariablesApi.updateProcessInstanceVariable(processInstanceId, variableName, { /* empty */ }).then(() => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -140,7 +140,7 @@ describe('Activiti Process Instance Variables Api', () => {
|
||||
const variableName = 'var1';
|
||||
variablesMock.addUpdateProcessInstanceVariable500Response(processInstanceId, variableName);
|
||||
|
||||
processInstanceVariablesApi.updateProcessInstanceVariable(processInstanceId, variableName, {}).then(NOOP, (error) => {
|
||||
processInstanceVariablesApi.updateProcessInstanceVariable(processInstanceId, variableName, { /* empty */ }).then(NOOP, (error) => {
|
||||
assert.equal(error.status, 500);
|
||||
assert.equal(error.message, '{"messageKey":"UNKNOWN","message":"Unknown error"}');
|
||||
done();
|
||||
|
@@ -24,9 +24,9 @@ describe('SuperagentHttpClient', () => {
|
||||
const client = new SuperagentHttpClient();
|
||||
|
||||
it('should create a request with response type blob', () => {
|
||||
const queryParams = {};
|
||||
const headerParams = {};
|
||||
const formParams = {};
|
||||
const queryParams = { /* empty */ };
|
||||
const headerParams = { /* empty */ };
|
||||
const formParams = { /* empty */ };
|
||||
|
||||
const contentTypes = 'application/json';
|
||||
const accepts = 'application/json';
|
||||
@@ -43,7 +43,7 @@ describe('SuperagentHttpClient', () => {
|
||||
},
|
||||
type: 'basic'
|
||||
},
|
||||
defaultHeaders: {}
|
||||
defaultHeaders: { /* empty */ }
|
||||
};
|
||||
|
||||
const response: any = client['buildRequest'](
|
||||
|
@@ -100,7 +100,7 @@ describe('Upload', () => {
|
||||
|
||||
const uploadPromise: any = uploadApi.uploadFile(file);
|
||||
|
||||
uploadPromise.catch(() => {});
|
||||
uploadPromise.catch(() => { /* empty */ });
|
||||
uploadPromise.on('success', () => {
|
||||
done();
|
||||
});
|
||||
@@ -112,7 +112,7 @@ describe('Upload', () => {
|
||||
const file = createTestFileStream('testFile.txt');
|
||||
|
||||
const uploadPromise: any = uploadApi.uploadFile(file);
|
||||
uploadPromise.catch(() => {});
|
||||
uploadPromise.catch(() => { /* empty */ });
|
||||
uploadPromise.on('error', () => {
|
||||
done();
|
||||
});
|
||||
@@ -125,7 +125,7 @@ describe('Upload', () => {
|
||||
|
||||
const uploadPromise: any = uploadApi.uploadFile(file);
|
||||
|
||||
uploadPromise.catch(() => {});
|
||||
uploadPromise.catch(() => { /* empty */ });
|
||||
uploadPromise.on('unauthorized', () => {
|
||||
done();
|
||||
});
|
||||
@@ -185,7 +185,7 @@ describe('Upload', () => {
|
||||
uploadMock.get201CreationFile();
|
||||
|
||||
const uploadPromise: any = uploadApi.uploadFile(file);
|
||||
uploadPromise.catch(() => {});
|
||||
uploadPromise.catch(() => { /* empty */ });
|
||||
uploadPromise.once('success', () => {
|
||||
errorOneOk = true;
|
||||
resolve('Resolving');
|
||||
@@ -196,7 +196,7 @@ describe('Upload', () => {
|
||||
uploadMock.get201CreationFile();
|
||||
|
||||
const uploadPromise: any = uploadApi.uploadFile(fileTwo);
|
||||
uploadPromise.catch(() => {});
|
||||
uploadPromise.catch(() => { /* empty */ });
|
||||
uploadPromise.once('success', () => {
|
||||
errorTwoOk = true;
|
||||
resolve('Resolving');
|
||||
@@ -221,7 +221,7 @@ describe('Upload', () => {
|
||||
uploadMock.get201CreationFile();
|
||||
|
||||
const uploadPromiseOne: any = uploadApi.uploadFile(file);
|
||||
uploadPromiseOne.catch(() => {});
|
||||
uploadPromiseOne.catch(() => { /* empty */ });
|
||||
uploadPromiseOne.once('success', () => {
|
||||
successOneOk = true;
|
||||
resolve('Resolving');
|
||||
@@ -232,7 +232,7 @@ describe('Upload', () => {
|
||||
uploadMock.get201CreationFile();
|
||||
|
||||
const uploadPromiseTwo: any = uploadApi.uploadFile(fileTwo);
|
||||
uploadPromiseTwo.catch(() => {});
|
||||
uploadPromiseTwo.catch(() => { /* empty */ });
|
||||
uploadPromiseTwo.once('success', () => {
|
||||
successTwoOk = true;
|
||||
resolve('Resolving');
|
||||
@@ -303,11 +303,11 @@ describe('Upload', () => {
|
||||
|
||||
uploadMock.get401Response();
|
||||
|
||||
let promiseProgressOne = {};
|
||||
let promiseProgressTwo = {};
|
||||
let promiseProgressOne = { /* empty */ };
|
||||
let promiseProgressTwo = { /* empty */ };
|
||||
|
||||
const uploadPromise: any = uploadApi.uploadFile(file);
|
||||
uploadPromise.catch(() => {});
|
||||
uploadPromise.catch(() => { /* empty */ });
|
||||
|
||||
uploadPromise
|
||||
.once('error', () => {
|
||||
|
Reference in New Issue
Block a user