I am using Jest for testing mu nodejs code an after commiting my code the pipeline runs and Jest test case is throwing error but pipeline is not failing. In test case it shows there are not expected results and so test case is failing but is not forcing the gitlab pipeline to fail. Any help?
✓ (10 ms)
✓ Test case for creating patient form testing (12 ms)
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 3.174 s
Ran all test suites matching /patient_create.test.js/i.
(node:18484) UnhandledPromiseRejectionWarning: Error: expect(received).not.toBeDefined()
Received: [Error: expect(received).toBe(expected) // Object.is equality·
Expected: 200
Received: 404]```