Skip to content

Commit

Permalink
fix: remove unused '@ts-expect-error' directives
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Nov 1, 2024
1 parent e34ba51 commit b95fa71
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/utils/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ describe('cache', () => {
const testKey = 'testKey';
const testValue = Buffer.from('testValue');

// @ts-expect-error too lazy
jest.mocked(mockedDB.get).mockReturnValue(Promise.resolve(testValue));

const result = await cache(testKey, async () => Promise.resolve(Buffer.from('newValue')));
Expand All @@ -35,7 +34,6 @@ describe('cache', () => {
const testKey = 'newKey';
const newValue = Buffer.from('newValue');
// Simulate a cache miss by throwing an error
// @ts-expect-error too lazy
jest.mocked(mockedDB.get).mockRejectedValue(new Error('Key not found'));

const result = await cache(testKey, async () => Promise.resolve(newValue));
Expand All @@ -49,7 +47,6 @@ describe('cache', () => {
const testKey = 'invalidKey';

// Simulate a cache miss
// @ts-expect-error too lazy
jest.mocked(mockedDB.get).mockRejectedValue(new Error('Key not found'));

await expect(cache(testKey, async () => Promise.resolve('notABuffer' as unknown as Buffer)))
Expand Down

0 comments on commit b95fa71

Please sign in to comment.