我正在使用Jest测试mu nodejs代码,在提交我的代码后,管道运行并且Jest测试用例抛出错误,但是管道没有失败。 在测试用例中,它表明没有预期的结果,因此测试用例失败了,但没有强迫gitlab管道失败。有帮助吗?
✓ (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]```