Skip to content

Commit

Permalink
refactor(core): Delete unused code, and fix typings in tests (no-chan…
Browse files Browse the repository at this point in the history
…gelog)
  • Loading branch information
netroy committed Dec 22, 2023
1 parent baee47a commit 755a511
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 202 deletions.
51 changes: 0 additions & 51 deletions packages/cli/src/WorkflowCredentials.ts

This file was deleted.

6 changes: 3 additions & 3 deletions packages/cli/test/integration/credentials.controller.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Credentials } from '@/requests';
import type { ListQuery } from '@/requests';
import type { User } from '@db/entities/User';
import * as testDb from './shared/testDb';
import { setupTestServer } from './shared/utils/';
Expand All @@ -21,7 +21,7 @@ beforeEach(async () => {
member = await createMember();
});

type GetAllResponse = { body: { data: Credentials.WithOwnedByAndSharedWith[] } };
type GetAllResponse = { body: { data: ListQuery.Credentials.WithOwnedByAndSharedWith[] } };

describe('GET /credentials', () => {
describe('should return', () => {
Expand Down Expand Up @@ -278,7 +278,7 @@ describe('GET /credentials', () => {
});
});

function validateCredential(credential: Credentials.WithOwnedByAndSharedWith) {
function validateCredential(credential: ListQuery.Credentials.WithOwnedByAndSharedWith) {
const { name, type, nodesAccess, sharedWith, ownedBy } = credential;

expect(typeof name).toBe('string');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('ExecutionRepository', () => {
const executionId = await executionRepo.createNewExecution({
workflowId: workflow.id,
data: {
//@ts-expect-error This is not needed for tests
resultData: {},
},
workflowData: workflow,
Expand Down
1 change: 1 addition & 0 deletions packages/cli/test/unit/CredentialsHelper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ describe('CredentialsHelper', () => {

for (const testData of tests) {
test(testData.description, async () => {
//@ts-expect-error `loadedCredentials` is a getter and we are replacing it here with a property
mockNodesAndCredentials.loadedCredentials = {
[testData.input.credentialType.name]: {
type: testData.input.credentialType,
Expand Down
1 change: 1 addition & 0 deletions packages/cli/test/unit/InternalHooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('InternalHooks', () => {
licensePlanName,
licenseTenantId,
binary_data_s3: false,
multi_main_setup_enabled: false,
};

const parameters = {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/unit/Telemetry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Telemetry', () => {
const postHog = new PostHogClient(instanceSettings);
await postHog.init();

telemetry = new Telemetry(mock(), postHog, mock(), instanceSettings);
telemetry = new Telemetry(mock(), postHog, mock(), instanceSettings, mock());
(telemetry as any).rudderStack = mockRudderStack;
});

Expand Down
147 changes: 0 additions & 147 deletions packages/cli/test/unit/WorkflowCredentials.test.ts

This file was deleted.

0 comments on commit 755a511

Please sign in to comment.