feat(Toast): add overlayStyle option #7898

This commit is contained in:
chenjiahan
2021-01-14 21:13:04 +08:00
parent 3b007c9cfd
commit c553551578
6 changed files with 23 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
import Toast from '../Toast';
import { mount } from '@vue/test-utils';
import { later } from '../../../test';
test('should change overlay style after using overlay-style prop', async () => {
const wrapper = mount(Toast, {
props: {
show: true,
overlayStyle: {
background: 'red',
},
},
});
await later();
expect(wrapper.find('.van-overlay').element.style.background).toEqual('red');
});