更新时间:2022-02-19 23:41:11
我在 https://github.com/jimisdrpc/basic-vanilla-webcomponent 现在可以使用wct进行单元测试.我更改的是
I stumbled in the answer in Specify browser location for wct-local test. It is different question (it is regard using gulp) but I noticed something different from my wct.conf.js which I gave a try and it in https://github.com/jimisdrpc/basic-vanilla-webcomponent now unit testing working with wct. What I changed was instead of
configuration: { suites:
[ 'test/hello-world-test.html']},
我写了
suites:
["test/hello-world-test.html"],
我仍然收到警告"chrome无法最大化",但这在另一个问题中发布(),我不知道这是否真的很重要,因为现在单元测试已启动并正在运行.最后,我只需要在命令提示符下键入wct.
I am still getting the warnning "chrome failed to maximize" but this is posted in another question ("chrome failed to maximize" during unit tests) and I don't know if it is really important since now the unit tests is up and running. Finally I just type wct in my command prompt.
PS:我希望有更多文章阐述如何对原始Web组件进行单元测试.我仍然想知道我是否朝着正确的方向使用聚合物制成的wct来测试香草Web组件.
PS.: I wish there was more articles expalining how unit test vanilla webcomponents. I am still wondering if I am in the right direction use wct from polymer to test vanilla webconmponents.