[MIGRATION] - Fixed lint errors for empty function

This commit is contained in:
VitoAlbano
2024-08-05 23:06:04 +01:00
parent cf175c67b8
commit 1c339a926b
867 changed files with 2147 additions and 2153 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -56,7 +56,7 @@ describe('Queries', () => {
nodesMock.get401Response();
queriesApi.findNodes(searchTerm).then(
() => {},
() => { /* empty */ },
() => {
done();
}

View File

@@ -59,7 +59,7 @@ describe('Tags', () => {
tagMock.get401Response();
tagsApi.listTags().then(
() => {},
() => { /* empty */ },
() => {
done();
}

View File

@@ -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();
});