constERR_RE=/expected:<(.*)> but was:<(.*)>/letresult;beforeAll(async()=>{awaitprogram.reLaunch('/pages/test/index')page=awaitprogram.currentPage()awaitpage.waitFor(3000);constdata=awaitpage.data('result');result=data})functiongetApiFailed(describe,api){constfailed=result[describe]?.failed?.find(item=>{returnitem.split(':')[0]===api})returnfailed}describes.forEach(d=>{d?.describe&&describe(d.describe,()=>{d?.tests&&d.tests.forEach(api=>{it(api,()=>{constfailed=getApiFailed(d.describe,api)if(failed){constparts=failed.split('\n')constmatches=parts[1].match(ERR_RE)if(matches?.length){expect(matches[2]).toEqual(matches[1])}else{expect(parts[1]).toEqual('')}}})})})})