如何在 WordPress 古腾堡编辑器中通过所有拉取请求测试?

问题描述

美好的一天。我提出了一个拉取请求来修复古腾堡编辑器中的错误 - https://github.com/WordPress/gutenberg/pull/29039,但它没有通过所有测试。 例如:

● FormTokenField › suggestions › suggestions that begin with match are boosted

expect(jest.fn()).not.toHaveErrored(expected)

Expected mock function not to be called but it was called with:
["Error: Uncaught [TypeError: Cannot create property 'label' on string 'sound']

  34 |  function assertExpectedCalls() {
  35 |      if ( spy.assertionsNumber === 0 && spy.mock.calls.length > 0 ) {
> 36 |          expect( console ).not[ matcherName ]();
     |          ^
  37 |      }
  38 |  }
  39 |

所有测试 - https://github.com/WordPress/gutenberg/pull/29039/checks?check_run_id=1910968291

  1. 有人可以解释一下这些测试是如何工作的吗?
  2. 我需要在代码中更改哪些内容才能通过所有测试? 谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)