From 14d4b89534a37fbc4ccd2a8eb8b30e719992ef61 Mon Sep 17 00:00:00 2001 From: Pedro Ramos Date: Wed, 5 Jun 2024 11:15:06 +0200 Subject: [PATCH] test: handle a different analytics config file for testing (#1452) --- test/integration/config/analytics.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/integration/config/analytics.test.ts b/test/integration/config/analytics.test.ts index 4d95d641e08..7ac5d4d04a6 100644 --- a/test/integration/config/analytics.test.ts +++ b/test/integration/config/analytics.test.ts @@ -1,6 +1,17 @@ import { expect, test } from '@oclif/test'; +import { fileCleanup } from '../../helpers'; + +const analyticsConfigFilePath = './test/fixtures/.asyncapi-analytics'; describe('config:analytics', () => { + beforeEach(() => { + process.env = Object.assign(process.env, { ASYNCAPI_METRICS_CONFIG_PATH: analyticsConfigFilePath }); + }); + + afterEach(() => { + fileCleanup(analyticsConfigFilePath); + }); + describe('with disable flag', () => { test .stderr()