From d0136ef58014ee8e369f0b70c39064bc959f8ffb Mon Sep 17 00:00:00 2001 From: Vlad Ioffe Date: Fri, 6 Dec 2024 11:22:33 +0200 Subject: [PATCH] fix 2 --- src/memoize/memoize.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/memoize/memoize.spec.ts b/src/memoize/memoize.spec.ts index 87a621e..eb1f9e6 100644 --- a/src/memoize/memoize.spec.ts +++ b/src/memoize/memoize.spec.ts @@ -3,10 +3,8 @@ import { sleep } from '../common/test-utils'; import { describe, it, mock } from 'node:test'; import assert from 'node:assert'; -declare const window: any; - -describe('memozie', () => { - it('should verify memoize caching original method', (ctx, done) => { +describe('memoize', () => { + it('should verify memoize caching original method', (_, done) => { const spy = mock.fn((x: number, y: number) => x + y); class T { @@ -53,7 +51,7 @@ describe('memozie', () => { }, Error('@memoize is applicable only on a methods.')); }); - it('should use provided cache', (ctx, done) => { + it('should use provided cache', (_2, done) => { const cache = new Map(); const spy = mock.fn(() => 1); @@ -85,6 +83,7 @@ describe('memozie', () => { class T { + // eslint-disable-next-line class-methods-use-this @memoize({ expirationTimeMs: 10, keyResolver: mapper }) fooWithMapper(x: string, y: string): string { return spyFooWithMapper(x, y); @@ -109,6 +108,7 @@ describe('memozie', () => { class T { foo = spyMapper; + // eslint-disable-next-line class-methods-use-this @memoize({ expirationTimeMs: 10, keyResolver: 'foo' }) fooWithInnerMapper(x: string, y: string): string { return spyFooWithMapper(x, y);