Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Aug 28, 2024
1 parent f06284c commit 118e02b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ describe('Diagnostics', () => {
const diagnostics = new Diagnostics(dr, oclifConfig);
await diagnostics.proxyEnvVarsCheck();

expect(lifecycleEmitSpy.callCount, 'Expected "Doctor:diagnostic" event fired 3 times').to.equal(3);
expect(drAddSuggestionSpy.called, 'Expected no suggestions to be added').to.be.false;
expect(lifecycleEmitSpy.callCount, 'Expected "Doctor:diagnostic" event fired 4 times').to.equal(4);
expect(drAddSuggestionSpy.callCount, 'Expected suggestion to be added for no_proxy').to.equal(1);
});

it('passes with proxy env vars in only lowercase', async () => {
Expand All @@ -144,8 +144,8 @@ describe('Diagnostics', () => {
const diagnostics = new Diagnostics(dr, oclifConfig);
await diagnostics.proxyEnvVarsCheck();

expect(lifecycleEmitSpy.callCount, 'Expected "Doctor:diagnostic" event fired 3 times').to.equal(3);
expect(drAddSuggestionSpy.called, 'Expected no suggestions to be added').to.be.false;
expect(lifecycleEmitSpy.callCount, 'Expected "Doctor:diagnostic" event fired 4 times').to.equal(4);
expect(drAddSuggestionSpy.callCount, 'Expected suggestion to be added for no_proxy').to.equal(1);
});

it('fails with non-matching proxy env vars', async () => {
Expand All @@ -163,8 +163,8 @@ describe('Diagnostics', () => {
const diagnostics = new Diagnostics(dr, oclifConfig);
await diagnostics.proxyEnvVarsCheck();

expect(lifecycleEmitSpy.callCount, 'Expected "Doctor:diagnostic" event fired 3 times').to.equal(3);
expect(drAddSuggestionSpy.callCount, 'Expected 3 suggestions to be added').to.equal(3);
expect(lifecycleEmitSpy.callCount, 'Expected "Doctor:diagnostic" event fired 4 times').to.equal(4);
expect(drAddSuggestionSpy.callCount, 'Expected 4 suggestions to be added').to.equal(4);
});
});

Expand Down

0 comments on commit 118e02b

Please sign in to comment.