From f845abe12e5a80b938c7435fd15c23bf145fe640 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Thu, 5 Jun 2025 14:06:02 +0200 Subject: [PATCH] chore: fix weirdness of assertions Signed-off-by: benjdlambert --- .../src/actions/createTemplateAction.test.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/scaffolder-node/src/actions/createTemplateAction.test.ts b/plugins/scaffolder-node/src/actions/createTemplateAction.test.ts index c813d560cb..b4ed095f03 100644 --- a/plugins/scaffolder-node/src/actions/createTemplateAction.test.ts +++ b/plugins/scaffolder-node/src/actions/createTemplateAction.test.ts @@ -30,14 +30,10 @@ describe('createTemplateAction', () => { handler: async ctx => { // @ts-expect-error - repoUrl is string const a: number = ctx.input.repoUrl; - const b: string = ctx.input.repoUrl; - expect(b).toBeDefined(); - // @ts-expect-error - logStream is not available - const stream = ctx.logStream; - - expect(stream).toBeDefined(); + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + [a, b]; ctx.output('test', 'value'); @@ -84,17 +80,19 @@ describe('createTemplateAction', () => { const a: number = ctx.input.repoUrl; const b: string = ctx.input.repoUrl; - // eslint-disable-next-line jest/no-conditional-expect - expect(b).toBeDefined(); + + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + [a, b]; } if ('numberThing' in ctx.input) { const a: number = ctx.input.numberThing; - // eslint-disable-next-line jest/no-conditional-expect - expect(a).toBeDefined(); // @ts-expect-error - not valid input type const b: string = ctx.input.numberThing; + + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + [a, b]; } }, });