vueless 0.0.798 → 0.0.799
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -3
- package/ui.button/UButton.test.ts +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.799",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
"release:major": "release-it major --ci --npm.publish --git.tag --github.release",
|
|
41
41
|
"lint": "eslint --no-fix src/ .storybook/",
|
|
42
42
|
"lint:fix": "eslint --fix src/ .storybook/",
|
|
43
|
-
"lint:ci": "eslint --no-fix --max-warnings=0"
|
|
43
|
+
"lint:ci": "eslint --no-fix --max-warnings=0",
|
|
44
|
+
"test": "vitest",
|
|
45
|
+
"test:ci": "vitest --run"
|
|
44
46
|
},
|
|
45
47
|
"bin": {
|
|
46
48
|
"vueless": "./bin/index.js"
|
|
@@ -63,10 +65,11 @@
|
|
|
63
65
|
"@types/jsdom": "^21.1.7",
|
|
64
66
|
"@types/lodash-es": "^4.17.12",
|
|
65
67
|
"@types/node": "^22.7.7",
|
|
66
|
-
"@vitejs/plugin-vue": "^5.
|
|
68
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
67
69
|
"@vitest/eslint-plugin": "^1.1.7",
|
|
68
70
|
"@vue/eslint-config-prettier": "^10.0.0",
|
|
69
71
|
"@vue/eslint-config-typescript": "^14.1.1",
|
|
72
|
+
"@vue/test-utils": "^2.4.6",
|
|
70
73
|
"@vue/tsconfig": "^0.5.1",
|
|
71
74
|
"@vueless/storybook": "^0.0.59",
|
|
72
75
|
"autoprefixer": "^10.4.19",
|
|
@@ -84,6 +87,7 @@
|
|
|
84
87
|
"typescript": "^5.6.3",
|
|
85
88
|
"vite": "6.0.9",
|
|
86
89
|
"vite-plugin-compression": "^0.5.1",
|
|
90
|
+
"vitest": "^3.0.5",
|
|
87
91
|
"vue": "^3.5.4",
|
|
88
92
|
"vue-i18n": "^10.0.4",
|
|
89
93
|
"vue-router": "^4.3.2",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { mount } from "@vue/test-utils";
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
|
|
4
|
+
import UButton from "./UButton.vue";
|
|
5
|
+
|
|
6
|
+
describe("UButton.vue", () => {
|
|
7
|
+
it("component renders", () => {
|
|
8
|
+
const label = "";
|
|
9
|
+
const result = "invisible";
|
|
10
|
+
|
|
11
|
+
const component = mount(UButton, {
|
|
12
|
+
props: {
|
|
13
|
+
label,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
expect(component.text()).toBe(result);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("renders the correct label", () => {
|
|
21
|
+
const label = "Button";
|
|
22
|
+
const result = label;
|
|
23
|
+
|
|
24
|
+
const component = mount(UButton, {
|
|
25
|
+
props: {
|
|
26
|
+
label,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
expect(component.text()).toContain(result);
|
|
31
|
+
});
|
|
32
|
+
});
|