[improvement] Dialog: enable lazy-render (#2495)

This commit is contained in:
neverland
2019-01-11 21:22:41 +08:00
committed by GitHub
parent c65e21e586
commit 5e623c1e34
5 changed files with 9 additions and 1 deletions

View File

@@ -9,10 +9,11 @@ test('Dialog function call', async () => {
Dialog.close();
Dialog.alert('1');
await later();
const callback = jest.fn();
const dialog = document.querySelector('.van-dialog');
await later();
expect(dialog.style.display).toEqual('');
Dialog.close();
@@ -33,6 +34,7 @@ test('Dialog function call', async () => {
test('before close', () => {
const wrapper = mount(DialogVue, {
propsData: {
value: true,
beforeClose: (action, done) => done(false)
}
});