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

@@ -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}".`,
);