From 8e580da949f581037a77af70810dd27fc58605c4 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Mon, 22 Jul 2024 09:19:28 -0700 Subject: [PATCH] format --- src/breaker/Breaker.ts | 1 - src/breaker/CountBreaker.test.ts | 1 - src/breaker/CountBreaker.ts | 2 -- src/breaker/SamplingBreaker.test.ts | 3 --- 4 files changed, 7 deletions(-) diff --git a/src/breaker/Breaker.ts b/src/breaker/Breaker.ts index 6a83e79..e3490cb 100644 --- a/src/breaker/Breaker.ts +++ b/src/breaker/Breaker.ts @@ -24,4 +24,3 @@ export interface IBreaker { export * from './ConsecutiveBreaker'; export * from './CountBreaker'; export * from './SamplingBreaker'; - diff --git a/src/breaker/CountBreaker.test.ts b/src/breaker/CountBreaker.test.ts index eaffd25..8cb7020 100644 --- a/src/breaker/CountBreaker.test.ts +++ b/src/breaker/CountBreaker.test.ts @@ -74,7 +74,6 @@ describe('CountBreaker', () => { expect(state.samples).to.deep.equal([true, false, true, true, true]); }); - it('serializes and deserializes', () => { let b = new CountBreaker({ threshold: 0.5, size: 5 }); for (let i = 0; i < 9; i++) { diff --git a/src/breaker/CountBreaker.ts b/src/breaker/CountBreaker.ts index 90a9473..e4163cf 100644 --- a/src/breaker/CountBreaker.ts +++ b/src/breaker/CountBreaker.ts @@ -21,7 +21,6 @@ export interface ICountBreakerOptions { minimumNumberOfCalls?: number; } - interface ICountBreakerState { samples: (boolean | null)[]; currentSample: number; @@ -29,7 +28,6 @@ interface ICountBreakerState { successes: number; } - export class CountBreaker implements IBreaker { private readonly threshold: number; private readonly minimumNumberOfCalls: number; diff --git a/src/breaker/SamplingBreaker.test.ts b/src/breaker/SamplingBreaker.test.ts index 9a5708b..ba03f01 100644 --- a/src/breaker/SamplingBreaker.test.ts +++ b/src/breaker/SamplingBreaker.test.ts @@ -130,9 +130,6 @@ describe('SamplingBreaker', () => { }); }); - - - describe('functionality', () => { let b: SamplingBreaker; let clock: SinonFakeTimers;