You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Serenity-JS/Cucumber/Chai断言错误求助:简单测试失败排查

被Serenity-JS、Cucumber与Chai的Promise AssertionError卡壳了

我最近踩了个坑——Serenity-JS、Cucumber和Chai组合抛出的Promise AssertionError,一个看起来超简单的测试死活失败,我愣是找不到问题出在哪!

我的Feature文件内容

Scenario: List all accounts in the tenant
Given that Keith has navigated to the tenant account list
When he views the accounts in the table that include name, name, name
Then he should also see 1,2,3 in the list

步骤定义文件的代码片段

this.When(/^(.*?) views the accounts in the table that include (.*)$/, (name: string, accountInformation: string) => { 
    return stage...
});

内容的提问来源于stack exchange,提问作者kapperkp

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:41:10