You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a test returns a non-error test failure, Allure will return an error when trying to extract the message and trace. For example, when a timeout is reached in Jest. This also means the test will not be marked as failure but be completely ignored in the final result.
To Reproduce
Install both Jest and Allure Jest and run the following test:
functionadd(a,b){returna+b;}describe("test/index",function(){it("should add two numbers",async()=>{awaitnewPromise(resolve=>setTimeout(resolve,10000));expect(add(1,2)).toEqual(3);},5000);});
This will throw the following error:
TypeError: Cannot use 'in' operator to search for 'actual' in Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout.
at getMessageAndTraceFromError (node_modules/allure-js-commons/src/sdk/utils.ts:49:26)
at NodeEnvironment._statusAndDetails (node_modules/allure-jest/src/environmentFactory.ts:372:50)
at NodeEnvironment.call (node_modules/allure-jest/src/environmentFactory.ts:296:57)
at NodeEnvironment.call [as handleTestEvent] (node_modules/allure-jest/src/environmentFactory.ts:106:31)
Expected behavior
It should not throw an error and simply return the message as the cause, correctly marking it as failed with the proper cause.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a test returns a non-error test failure, Allure will return an error when trying to extract the message and trace. For example, when a timeout is reached in Jest. This also means the test will not be marked as failure but be completely ignored in the final result.
To Reproduce
Install both Jest and Allure Jest and run the following test:
This will throw the following error:
Expected behavior
It should not throw an error and simply return the message as the cause, correctly marking it as failed with the proper cause.
The text was updated successfully, but these errors were encountered: