我有这个可以消除的夹具<page-welcome>:
<test-fixture id="fixture-one">
<template>
<page-welcome></page-welcome>
</template>
</test-fixture>
在 内<page-welcome>,我导入<paper-button>并给它一个big-btn. 这个按钮存在于<page-welcome>元素上很重要,所以我想测试它:
test('does the custom cmponent exist', function() {
var test = fixture('fixture-one').shadowRoot.querySelector('.big-btn');
assert.exists(test);
});
据我了解,我应该能够使用所有 Chai API,因此assert.exists应该可用。
但是为什么我会收到以下错误?
assert.exists is not a function