Skip to content

Commit

Permalink
Merge branch 'master' into test/refactor-testHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns authored Apr 12, 2024
2 parents 5d32ea0 + 78caf99 commit eebc09a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions test/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 2 additions & 4 deletions test/integration/config/analytics.test.ts
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand Down

0 comments on commit eebc09a

Please sign in to comment.