blessing-skin-server/resources/assets/tests/scripts/notify.test.ts
2019-11-28 16:24:12 +08:00

14 lines
369 B
TypeScript

import 'bootstrap'
import * as notify from '@/scripts/notify'
test('show modal', async () => {
process.nextTick(() => {
expect(
document.querySelector('.modal-title')!.textContent,
).toBe('general.tip')
document.querySelector<HTMLButtonElement>('.btn-primary')!.click()
})
const { value } = await notify.showModal()
expect(value).toBe('')
})