Skip to content

Commit

Permalink
✅ [loading] add loading indicator slot test
Browse files Browse the repository at this point in the history
  • Loading branch information
higuaifan committed Jan 22, 2025
1 parent dacf215 commit b57bccc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/test/component/other/loading.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,17 @@ describe('loading', function () {
wrapper.unmount();
});
});

describe('indicator slot', () => {
test('render', () => {
const wrapper = mount(MLoading, {
slots: {
indicator: '<div class="m-loading-indicator"></div>',
},
});
expect(wrapper.find('.m-loading-indicator')).not.toBeNull();
expect(wrapper.html()).not.toContain('m-loading-main');
wrapper.unmount();
});
});
});

0 comments on commit b57bccc

Please sign in to comment.