element-ui/test/unit/specs/breadcrumb.spec.js

24 lines
643 B
Vue
Raw Permalink Normal View History

2021-06-07 11:56:04 +08:00
import { createVue, destroyVM } from '../util';
describe('Breadcrumb', () => {
let vm;
afterEach(() => {
destroyVM(vm);
});
it('create', done => {
vm = createVue(`
<el-breadcrumb separator=">">
<el-breadcrumb-item to="/">首页</el-breadcrumb-item>
<el-breadcrumb-item>活动管理</el-breadcrumb-item>
<el-breadcrumb-item>活动列表</el-breadcrumb-item>
<el-breadcrumb-item>活动详情</el-breadcrumb-item>
</el-breadcrumb>
`);
vm.$nextTick(_ => {
expect(vm.$el.querySelector('.el-breadcrumb__separator').innerText).to.equal('>');
done();
});
});
});