Skip to content

Commit b57bccc

Browse files
committed
✅ [loading] add loading indicator slot test
1 parent dacf215 commit b57bccc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/test/component/other/loading.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,17 @@ describe('loading', function () {
106106
wrapper.unmount();
107107
});
108108
});
109+
110+
describe('indicator slot', () => {
111+
test('render', () => {
112+
const wrapper = mount(MLoading, {
113+
slots: {
114+
indicator: '<div class="m-loading-indicator"></div>',
115+
},
116+
});
117+
expect(wrapper.find('.m-loading-indicator')).not.toBeNull();
118+
expect(wrapper.html()).not.toContain('m-loading-main');
119+
wrapper.unmount();
120+
});
121+
});
109122
});

0 commit comments

Comments
 (0)