From 7e2185e2466d89c1f4af89d4cf741fd98086a14e Mon Sep 17 00:00:00 2001 From: Omri Luzon Date: Fri, 18 Nov 2022 06:39:48 +0200 Subject: [PATCH] Update packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts Co-authored-by: Joshua Chen --- .../tests/rules/prefer-optional-chain.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts b/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts index 87fd41be115..c375fcf5611 100644 --- a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts @@ -201,10 +201,10 @@ ruleTester.run('prefer-optional-chain', rule, { '!a.#foo || !a.#foo.bar;', 'a.#foo?.bar;', '!a.#foo?.bar;', - 'foo().#a;', - 'a.b.#a;', - 'new A().#b;', - '(await a).#b;', + '!foo().#a || a;', + '!a.b.#a || a;', + '!new A().#b || a;', + '!(await a).#b || a;', // currently do not handle complex computed properties 'foo && foo[bar as string] && foo[bar as string].baz;', 'foo && foo[1 + 2] && foo[1 + 2].baz;',