Shun Miyazawa 1 год назад
Родитель
Сommit
f8e2506c66
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      apps/app/src/features/rate-limiter/middleware/factory.integ.ts

+ 2 - 1
apps/app/src/features/rate-limiter/middleware/factory.integ.ts

@@ -11,9 +11,10 @@ describe('factory.ts', async() => {
       // Issue: https://github.com/animir/node-rate-limiter-flexible/issues/216
       try {
         await _consumePoints(method, key, { method, maxRequests });
-        throw new Error('Should throw an error');
+        throw new Error('Exception occurred');
       }
       catch (err) {
+        expect(err.message).not.toBe('Exception occurred');
         expect(err).toBeInstanceOf(TypeError);
         expect(err.message).toBe("Cannot read properties of null (reading 'points')");
       }