Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个已禁用的测试套件/文件。它有一个关联的快照文件。对于我的特殊情况,我不想删除或更新快照文件(长话短说:它在其他地方使用)。
因此,Jest 只为过时的快照注销一个警告,而不是失败。然而,Jest 然后以代码 1 退出,我的构建失败。尽管实际上没有测试失败,但仍会发生这种情况。
我可以调整配置以忽略过时的快照吗?还是有其他方法可以让 Jest 在仅发出警告后以代码 0 退出?