ci: Expand ESLint to tests in BE packages (no-changelog) (#6147)

* 🔧 Adjust base ESLint config

* 🔧 Adjust `lint` and `lintfix` in `nodes-base`

* 🔧 Include `test` and `utils` in `nodes-base`

* 📘 Convert JS tests to TS

* 👕 Apply lintfixes
This commit is contained in:
Iván Ovejero
2023-05-02 10:37:19 +02:00
committed by GitHub
parent c63181b317
commit 06fa6f1fb3
59 changed files with 390 additions and 307 deletions

View File

@@ -1,6 +1,7 @@
import { v4 as uuid } from 'uuid';
import { Container } from 'typedi';
import { ICredentialTypes, INodeTypes, SubworkflowOperationError, Workflow } from 'n8n-workflow';
import type { ICredentialTypes, INodeTypes } from 'n8n-workflow';
import { SubworkflowOperationError, Workflow } from 'n8n-workflow';
import config from '@/config';
import * as Db from '@/Db';
@@ -79,7 +80,7 @@ describe('PermissionChecker.check()', () => {
],
});
expect(() => PermissionChecker.check(workflow, userId)).not.toThrow();
expect(async () => PermissionChecker.check(workflow, userId)).not.toThrow();
});
test('should allow if requesting user is instance owner', async () => {
@@ -109,7 +110,7 @@ describe('PermissionChecker.check()', () => {
],
});
expect(async () => await PermissionChecker.check(workflow, owner.id)).not.toThrow();
expect(async () => PermissionChecker.check(workflow, owner.id)).not.toThrow();
});
test('should allow if workflow creds are valid subset', async () => {
@@ -156,7 +157,7 @@ describe('PermissionChecker.check()', () => {
],
});
expect(async () => await PermissionChecker.check(workflow, owner.id)).not.toThrow();
expect(async () => PermissionChecker.check(workflow, owner.id)).not.toThrow();
});
test('should deny if workflow creds are not valid subset', async () => {