diff --git a/test/helpers/index.ts b/test/helpers/index.ts index 2c703582608..fdddffc68e8 100644 --- a/test/helpers/index.ts +++ b/test/helpers/index.ts @@ -8,7 +8,6 @@ import rimraf from 'rimraf'; const ASYNCAPI_FILE_PATH = path.resolve(process.cwd(), 'specification.yaml'); const SERVER_DIRECTORY= path.join(__dirname, '../fixtures/dummyspec'); export const PROJECT_DIRECTORY_PATH = path.join(process.cwd(), 'test-project'); -export const ANALYTICS_CONFIG_FILE_PATH = path.resolve(process.cwd(), '.asyncapi-analytics'); let server: http.Server; @@ -72,10 +71,6 @@ export default class ContextTestingHelper { deleteDummyProjectDirectory(): void { rimraf.sync(PROJECT_DIRECTORY_PATH); } - - deleteAnalyticsConfigFile(): void { - unlinkSync(ANALYTICS_CONFIG_FILE_PATH); - } } export function fileCleanup(filepath: string) { diff --git a/test/integration/config/analytics.test.ts b/test/integration/config/analytics.test.ts index cc33362031e..8f5ae75183d 100644 --- a/test/integration/config/analytics.test.ts +++ b/test/integration/config/analytics.test.ts @@ -1,11 +1,9 @@ import { expect, test } from '@oclif/test'; -import TestHelper from '../../helpers'; - -const testHelper = new TestHelper(); +import { fileCleanup } from '../../helpers'; describe('config:analytics', () => { afterEach(() => { - testHelper.deleteAnalyticsConfigFile(); + fileCleanup('.asyncapi-analytics'); }); describe('with disable flag', () => {