我有一个健康检查端点的测试用例,如果该特定端点失败,我希望测试中止所有测试..因为如果 healthchek 失败,将没有必要测试其余端点。我想知道中止其余测试的最佳方法是什么。这是我想要的代码
describe(`Health check Content services`, () => {
it(`Trigger /status endpoint and return 200`, async () => {
let data = await healthCheck.healthCheckRunner(config);
if(data == true) {
//continue rest of tests
} else {
//abort test execution
}
});
});