Skip to content

Commit

Permalink
Use a different path for analytics config file
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-rr committed May 28, 2024
1 parent 38eb04c commit fbe7557
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/integration/config/analytics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('config:analytics', () => {
test
.stderr()
.stdout()
.command(['config:analytics', '--disable'])
.command(['ASYNCAPI_METRICS_CONFIG_PATH=./test/fixtures/.asyncapi-analytics', 'config:analytics', '--disable'])
.it('should show a successful message once the analytics are disabled', async (ctx, done) => {
expect(ctx.stdout).to.equal('\nAnalytics disabled.\n\n');
expect(ctx.stderr).to.equal('');
Expand All @@ -17,7 +17,7 @@ describe('config:analytics', () => {
test
.stderr()
.stdout()
.command(['config:analytics', '--enable'])
.command(['ASYNCAPI_METRICS_CONFIG_PATH=./test/fixtures/.asyncapi-analytics', 'config:analytics', '--enable'])
.it('should show a successful message once the analytics are enabled', (ctx, done) => {
expect(ctx.stdout).to.equal('\nAnalytics enabled.\n\n');
expect(ctx.stderr).to.equal('');
Expand All @@ -29,7 +29,7 @@ describe('config:analytics', () => {
test
.stderr()
.stdout()
.command(['config:analytics'])
.command(['ASYNCAPI_METRICS_CONFIG_PATH=./test/fixtures/.asyncapi-analytics', 'config:analytics'])
.it('should show informational message when no flags are used', (ctx, done) => {
expect(ctx.stdout).to.equal('\nPlease append the "--disable" flag to the command in case you prefer to disable analytics, or use the "--enable" flag if you want to enable analytics back again. In case you do not know the analytics current status, then you can append the "--status" flag to be aware of it.\n\n');
expect(ctx.stderr).to.equal('');
Expand All @@ -41,7 +41,7 @@ describe('config:analytics', () => {
test
.stderr()
.stdout()
.command(['config:analytics', '--status'])
.command(['ASYNCAPI_METRICS_CONFIG_PATH=./test/fixtures/.asyncapi-analytics', 'config:analytics', '--status'])
.it('should show a different informational message depending on the analytics status', (ctx, done) => {
expect(ctx.stdout).to.contain('\nAnalytics are ');
expect(ctx.stderr).to.equal('');
Expand Down

0 comments on commit fbe7557

Please sign in to comment.