@ agent-incont/ 夹击
本地特工的杰斯特记者 检查失败文物,加 实验 追踪合同匹配者.
支助级别: · 实验(匹配)——见 支助。网络行为 : 网络-银行。 。 。 .
何时使用
- 与特工检查仪器代理的测试套房
- CI 失败证据与本地 Jest 输出
不使用时
- 测试(使用)
@agent-inspect/vitest(中文(简体) )
安装
npm install agent-inspect @agent-inspect/jest jest
端点 : jest@^29.0.0 || ^30.0.0 (可选元)
示例
// jest.config.js
const { AgentInspectJestReporter } = require("@agent-inspect/jest");
module.exports = {
reporters: [
"default",
[AgentInspectJestReporter, { artifactDir: ".agent-inspect/jest-artifacts" }],
],
};
追踪关联
这个记者 没有 利用时间戳创建协会.
没有关联的测试失败 产生一个 no-trace-association 诊断
(和范围 no-trace-association.md 而不是沉默无声.
将测试与当地追踪联系起来,其中一项是:
const { withAgentInspectJestTrace } = require("@agent-inspect/jest");
// 1) Helper metadata on the assertion result
expect.extend({
/* your matcher can attach: */
...withAgentInspectJestTrace({
runId: "run_abc",
tracePath: ".agent-inspect/run_abc.jsonl",
}),
});
// 2) Reporter options
[
AgentInspectJestReporter,
{
associations: {
"agent.test.js::does the thing": {
runId: "run_abc",
tracePath: ".agent-inspect/run_abc.jsonl",
},
},
// or resolveTrace: (test) => ({ runId, tracePath })
},
];
隐私
- 关于失败的本地文件; 代理检查没有网络
API 密码
createAgentInspectJestReporter编号 :AgentInspectJestReporterwithAgentInspectJestTrace• 明确的关联帮助器(不自动捕获)agentInspectJestMatchers- 实验性(toPassTraceContract, (中文(简体) ),toHaveRequiredTool(中文(简体) )
国 际
npx agent-inspect report 上传的 CI 文物
限制
- 初级表面为a 记者 (故障文物)加 实验 选手.
- 实验匹配器:
const { expect } = require("@jest/globals");
const { agentInspectJestMatchers } = require("@agent-inspect/jest");
expect.extend(agentInspectJestMatchers);
expect(read).toPassTraceContract(contract);
expect(read).toHaveRequiredTool("lookup_orders");
- 没有
expectTrace(...).toSatisfyTraceContract帮手. - 使用
agent-inspect check/ 火柴不足时深 CI 门的跟踪合同API.
文档
解决问题
- 未装入的记者 : 检查杰斯特
reporters您 Jest 版本的数组语法
版本
部分固定代理监取放行. 参见当前版本的npm徽章/包表.
许可证
麻省理工学院