jenesius-vue-modal
Version:
The progressive and simple modal system for Vue.js v3
14 lines (12 loc) • 476 B
text/typescript
import {container, openModal} from "../src/index";
import ModalTitle from "./components/modal-title.vue";
import {render} from "@testing-library/vue";
describe("Test init library", () => {
test("Throw error without mounting container", async () => {
await expect(openModal(ModalTitle)).rejects.toThrow();
})
test("Normal working. Container was mounted", async () => {
render(container);
await expect(openModal(ModalTitle)).resolves.not.toThrow()
})
})