Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrtqKr committed Mar 13, 2024
1 parent 6a9dffe commit 3e5fe1d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion workflow_tests/utils/ExtendedAct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {MockJob} from './JobMocker';

type ExtendedActOpts = RunOpts & {actor?: string; workflowFile?: string; mockJobs?: Record<string, MockJob>};

// @ts-expect-error Override shouldn't be done on private methods - wait until the issue is resolved
// @ts-expect-error Override shouldn't be done on private methods wait until https://github.com/kiegroup/act-js/issues/77 is resolved or try to create a params workaround
class ExtendedAct extends kieActJs.Act {
async parseRunOpts(opts?: ExtendedActOpts) {
const {cwd, actArguments, proxy} = await super['parseRunOpts'](opts);
Expand Down
3 changes: 1 addition & 2 deletions workflow_tests/utils/preGenerateTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ const stepAssertionTemplate = (stepName: string, jobId: string, stepMessage: str
const jobMocksTemplate = (jobMocksName: string, stepMocks: string[]) => {
const stepMocksString = stepMocks.map((stepMock) => `${stepMock}`).join(',');

return `const ${jobMocksName} = [${stepMocksString}
];`;
return `const ${jobMocksName} = [${stepMocksString}\n];`;
};

const jobAssertionTemplate = (jobAssertionName: string, stepAssertionsContent: string) => `
Expand Down
2 changes: 1 addition & 1 deletion workflow_tests/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function setJobRunners(act: ExtendedAct, jobs: Record<string, string>, workflowP
return act;
}

function deepCopy<T>(originalObject: T): T {
function deepCopy<TObject extends Record<string, unknown>>(originalObject: TObject): TObject {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return JSON.parse(JSON.stringify(originalObject));
}
Expand Down

0 comments on commit 3e5fe1d

Please sign in to comment.