Tweak test

This commit is contained in:
Pig Fang 2019-12-01 00:00:44 +08:00
parent 1e4454cdc0
commit 6cd5e9a1e7
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import $ from 'jquery'
import 'bootstrap'
import Vue from 'vue'
import Modal from '../components/Modal.vue'

View File

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