mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
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:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user