Remove MockGlobalStorage
This commit is contained in:
@@ -18,7 +18,7 @@ describe("Invocation rate limiter", () => {
|
|||||||
func: () => Promise<T>,
|
func: () => Promise<T>,
|
||||||
): InvocationRateLimiter<T> {
|
): InvocationRateLimiter<T> {
|
||||||
return new InvocationRateLimiter(
|
return new InvocationRateLimiter(
|
||||||
new MockGlobalStorage(),
|
new MockMemento(),
|
||||||
funcIdentifier,
|
funcIdentifier,
|
||||||
func,
|
func,
|
||||||
(s) => createDate(s),
|
(s) => createDate(s),
|
||||||
@@ -54,12 +54,6 @@ describe("Invocation rate limiter", () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MockGlobalStorage extends MockMemento {
|
|
||||||
public setKeysForSync(_keys: string[]): void {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
it("initially invokes function", async () => {
|
it("initially invokes function", async () => {
|
||||||
let numTimesFuncCalled = 0;
|
let numTimesFuncCalled = 0;
|
||||||
const invocationRateLimiter = createInvocationRateLimiter(
|
const invocationRateLimiter = createInvocationRateLimiter(
|
||||||
|
|||||||
Reference in New Issue
Block a user