Skip to content

Commit 3d305a8

Browse files
committed
feat: 在业务代码中增加单元测试
1 parent afe258c commit 3d305a8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { shallowMount } from '@vue/test-utils';
2+
import { default as Example } from '@/pages/example/components/Example.vue';
3+
4+
describe('分页/example/Example组件', () => {
5+
it('能够渲染message', () => {
6+
const message = 'Hello world!';
7+
const wrapper = shallowMount(Example, {
8+
propsData: {
9+
message
10+
}
11+
});
12+
expect(wrapper.html()).toMatch(message);
13+
});
14+
});

0 commit comments

Comments
 (0)