From 5586ec4550c12ae7b99a60deeba659648e442cdc Mon Sep 17 00:00:00 2001 From: Dominik Rowicki Date: Wed, 25 May 2022 12:45:20 +0200 Subject: [PATCH] chore(eslint-plugin): fix invalid code in promise spread tests (#5072) --- .../eslint-plugin/tests/rules/no-misused-promises.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/no-misused-promises.test.ts b/packages/eslint-plugin/tests/rules/no-misused-promises.test.ts index 24c9d4285d6..1551cfbfcf3 100644 --- a/packages/eslint-plugin/tests/rules/no-misused-promises.test.ts +++ b/packages/eslint-plugin/tests/rules/no-misused-promises.test.ts @@ -320,7 +320,7 @@ const _ = {}} />; console.log({ ...(await Promise.resolve({ key: 42 })) }); `, ` -const getData = Promise.resolve({ key: 42 }); +const getData = () => Promise.resolve({ key: 42 }); console.log({ someData: 42, @@ -346,7 +346,7 @@ console.log({ ...Promise.resolve({ key: 42 }) }); }, { code: ` -const getData = Promise.resolve({ key: 42 }); +const getData = () => Promise.resolve({ key: 42 }); console.log({ someData: 42,