How can I mark a test case as fail with Jest framework on LambdaTest?

How can I mark a test case as fail with Jest framework on LambdaTest?

Hi Emma!

To mark your test cases as failed with Jest framework, pass the following command in the try block.

self::$driver->executeScript("lambda-status=failed");