From 0c1d917395be1e7c0a172c40988afe71573adf0e Mon Sep 17 00:00:00 2001 From: Pedro Ramos Date: Fri, 5 Apr 2024 19:22:08 +0200 Subject: [PATCH] Refactor some methods --- test/helpers/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/helpers/index.ts b/test/helpers/index.ts index 06d01cdc406..b3c2759522e 100644 --- a/test/helpers/index.ts +++ b/test/helpers/index.ts @@ -64,18 +64,14 @@ export default class ContextTestingHelper { } deleteSpecFileAtWorkingDir(): void { - if (existsSync(ASYNCAPI_FILE_PATH)) { unlinkSync(ASYNCAPI_FILE_PATH); - } } newCommandHelper() { return { deleteSpecFile: () => { const specificationFilePath = path.resolve(process.cwd(), 'specification.yaml'); - if (existsSync(specificationFilePath)) { - unlinkSync(specificationFilePath); - } + unlinkSync(specificationFilePath); } }; }