Nx cypress - 添加用于可视化测试的自定义插件

Nx cypress - adding custom plugin for visual testing

我正在尝试设置一个来自 cypress https://docs.cypress.io/plugins/#visual-testing 但在 nrwl nx monorepo 中的可视化测试插件。

我按照 https://github.com/meinaart/cypress-plugin-snapshots 的指南进行操作,但无法正常工作。

实际结果是 toMatchImageSnapshot 不起作用(我有 is not a function 错误)

有没有人遇到同样的问题并且知道解决方案?

好的,这个问题已得到修复 github。com/nrwl/nx/issues/1609