Skip to content

Commit 14d4b89

Browse files
authored
test: handle a different analytics config file for testing (#1452)
1 parent 3c84634 commit 14d4b89

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/integration/config/analytics.test.ts

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import { expect, test } from '@oclif/test';
2+
import { fileCleanup } from '../../helpers';
3+
4+
const analyticsConfigFilePath = './test/fixtures/.asyncapi-analytics';
25

36
describe('config:analytics', () => {
7+
beforeEach(() => {
8+
process.env = Object.assign(process.env, { ASYNCAPI_METRICS_CONFIG_PATH: analyticsConfigFilePath });
9+
});
10+
11+
afterEach(() => {
12+
fileCleanup(analyticsConfigFilePath);
13+
});
14+
415
describe('with disable flag', () => {
516
test
617
.stderr()

0 commit comments

Comments
 (0)