mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 10:59:21 +08:00
wip: 更新单测
This commit is contained in:
parent
fb6b42d753
commit
a3f6c45866
@ -1,5 +1,5 @@
|
||||
import Notify from "@@/components/Notify/index.vue"
|
||||
import NotifyList from "@@/components/Notify/List.vue"
|
||||
import List from "@@/components/Notify/List.vue"
|
||||
import { shallowMount } from "@vue/test-utils"
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
@ -10,9 +10,9 @@ describe("notify", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("notifyList", () => {
|
||||
describe("list", () => {
|
||||
it("list 长度为 0", () => {
|
||||
const wrapper = shallowMount(NotifyList, {
|
||||
const wrapper = shallowMount(List, {
|
||||
props: {
|
||||
data: []
|
||||
}
|
||||
@ -20,7 +20,7 @@ describe("notifyList", () => {
|
||||
expect(wrapper.find("el-empty").exists()).toBe(true)
|
||||
})
|
||||
it("list 长度不为 0", () => {
|
||||
const wrapper = shallowMount(NotifyList, {
|
||||
const wrapper = shallowMount(List, {
|
||||
props: {
|
||||
data: [
|
||||
{
|
||||
|
@ -118,7 +118,12 @@ export default defineConfig(({ mode }) => {
|
||||
// Configuring Vitest: https://cn.vitest.dev/config
|
||||
test: {
|
||||
include: ["tests/**/*.test.{ts,js}"],
|
||||
environment: "jsdom"
|
||||
environment: "jsdom",
|
||||
server: {
|
||||
deps: {
|
||||
inline: ["element-plus"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user