mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -12,16 +12,16 @@ async function mockFind({
|
||||
type: string;
|
||||
}): Promise<IWorkflowCredentials | null> {
|
||||
// Simple statement that maps a return value based on the `id` parameter
|
||||
if (id === notFoundNode.credentials!!.test.id) {
|
||||
if (id === notFoundNode.credentials!.test.id) {
|
||||
return null;
|
||||
}
|
||||
// Otherwise just build some kind of credential object and return it
|
||||
return {
|
||||
[type]: {
|
||||
[id]: {
|
||||
id: id,
|
||||
id,
|
||||
name: type,
|
||||
type: type,
|
||||
type,
|
||||
nodesAccess: [],
|
||||
data: '',
|
||||
},
|
||||
@@ -49,7 +49,7 @@ describe('WorkflowCredentials', () => {
|
||||
});
|
||||
|
||||
test('Should return an error if any node has no credential ID', () => {
|
||||
const credentials = noIdNode.credentials!!.test;
|
||||
const credentials = noIdNode.credentials!.test;
|
||||
const expectedError = new Error(
|
||||
`Credentials with name "${credentials.name}" for type "test" miss an ID.`,
|
||||
);
|
||||
@@ -58,7 +58,7 @@ describe('WorkflowCredentials', () => {
|
||||
});
|
||||
|
||||
test('Should return an error if credentials cannot be found in the DB', () => {
|
||||
const credentials = notFoundNode.credentials!!.test;
|
||||
const credentials = notFoundNode.credentials!.test;
|
||||
const expectedError = new Error(
|
||||
`Could not find credentials for type "test" with ID "${credentials.id}".`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user