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;',