Tweak test
This commit is contained in:
parent
1e4454cdc0
commit
6cd5e9a1e7
|
|
@ -1,4 +1,5 @@
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
import 'bootstrap'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Modal from '../components/Modal.vue'
|
import Modal from '../components/Modal.vue'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'bootstrap'
|
import { showModal } from '@/scripts/modal'
|
||||||
import * as modal from '@/scripts/modal'
|
|
||||||
|
|
||||||
test('show modal', async () => {
|
test('show modal', async () => {
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
|
|
@ -8,6 +7,6 @@ test('show modal', async () => {
|
||||||
).toBe('general.tip')
|
).toBe('general.tip')
|
||||||
document.querySelector<HTMLButtonElement>('.btn-primary')!.click()
|
document.querySelector<HTMLButtonElement>('.btn-primary')!.click()
|
||||||
})
|
})
|
||||||
const { value } = await modal.showModal()
|
const { value } = await showModal()
|
||||||
expect(value).toBe('')
|
expect(value).toBe('')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user