From 8ddfbae8ce50388811171850e74acb6501e3eab2 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Sun, 25 Jun 2023 16:33:32 +0300 Subject: [PATCH] test: Fix coverage for decorator util --- lib/util/decorator/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util/decorator/index.ts b/lib/util/decorator/index.ts index 87bd71aa3c0e85..2a9ef484da9a06 100644 --- a/lib/util/decorator/index.ts +++ b/lib/util/decorator/index.ts @@ -38,11 +38,11 @@ export function decorate(fn: Handler): Decorator { const result: Decorator = ( target, key, - /* TODO: Can descriptor be undefined ? */ - descriptor = Object.getOwnPropertyDescriptor(target, key) ?? { + descriptor = { enumerable: true, configurable: true, writable: true, + ...Object.getOwnPropertyDescriptor(target, key), } ) => { const { value } = descriptor;