Skip to content

Commit

Permalink
Use toBeTrue() or toBeFalse() when testing a boolean result.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed May 20, 2024
1 parent cbd33c0 commit 7c5c587
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/shadowbox/server/shared_metrics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ describe('OutlineSharedMetricsPublisher', () => {

describe('Enable/Disable', () => {
it('Mirrors config', () => {
expect(publisher.isSharingEnabled()).toBeFalsy();
expect(publisher.isSharingEnabled()).toBeFalse();

publisher.startSharing();
expect(publisher.isSharingEnabled()).toBeTruthy();
expect(serverConfig.mostRecentWrite.metricsEnabled).toBeTruthy();
expect(publisher.isSharingEnabled()).toBeTrue();
expect(serverConfig.mostRecentWrite.metricsEnabled).toBeTrue();

publisher.stopSharing();
expect(publisher.isSharingEnabled()).toBeFalsy();
expect(serverConfig.mostRecentWrite.metricsEnabled).toBeFalsy();
expect(publisher.isSharingEnabled()).toBeFalse();
expect(serverConfig.mostRecentWrite.metricsEnabled).toBeFalse();
});

it('Reads from config', () => {
serverConfig.data().metricsEnabled = true;

expect(publisher.isSharingEnabled()).toBeTruthy();
expect(publisher.isSharingEnabled()).toBeTrue();
});
});

Expand Down

0 comments on commit 7c5c587

Please sign in to comment.