@najemi-software/vitest-dom 0.1.1
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/CHANGELOG.md +27 -0
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/chunk-V52HJAAH.js +1688 -0
- package/dist/chunk-V52HJAAH.js.map +1 -0
- package/dist/extend-expect.js +8 -0
- package/dist/extend-expect.js.map +1 -0
- package/dist/matchers.d.ts +765 -0
- package/dist/matchers.js +57 -0
- package/dist/matchers.js.map +1 -0
- package/extend-expect.d.ts +9 -0
- package/extend-expect.js +1 -0
- package/matchers.d.ts +1 -0
- package/matchers.js +1 -0
- package/package.json +65 -0
package/dist/matchers.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
toBeChecked,
|
|
3
|
+
toBeDisabled,
|
|
4
|
+
toBeEmpty,
|
|
5
|
+
toBeEmptyDOMElement,
|
|
6
|
+
toBeEnabled,
|
|
7
|
+
toBeInTheDOM,
|
|
8
|
+
toBeInTheDocument,
|
|
9
|
+
toBeInvalid,
|
|
10
|
+
toBePartiallyChecked,
|
|
11
|
+
toBeRequired,
|
|
12
|
+
toBeValid,
|
|
13
|
+
toBeVisible,
|
|
14
|
+
toContainElement,
|
|
15
|
+
toContainHTML,
|
|
16
|
+
toHaveAccessibleDescription,
|
|
17
|
+
toHaveAccessibleName,
|
|
18
|
+
toHaveAttribute,
|
|
19
|
+
toHaveClass,
|
|
20
|
+
toHaveDescription,
|
|
21
|
+
toHaveDisplayValue,
|
|
22
|
+
toHaveErrorMessage,
|
|
23
|
+
toHaveFocus,
|
|
24
|
+
toHaveFormValues,
|
|
25
|
+
toHaveStyle,
|
|
26
|
+
toHaveTextContent,
|
|
27
|
+
toHaveValue
|
|
28
|
+
} from "./chunk-V52HJAAH.js";
|
|
29
|
+
export {
|
|
30
|
+
toBeChecked,
|
|
31
|
+
toBeDisabled,
|
|
32
|
+
toBeEmpty,
|
|
33
|
+
toBeEmptyDOMElement,
|
|
34
|
+
toBeEnabled,
|
|
35
|
+
toBeInTheDOM,
|
|
36
|
+
toBeInTheDocument,
|
|
37
|
+
toBeInvalid,
|
|
38
|
+
toBePartiallyChecked,
|
|
39
|
+
toBeRequired,
|
|
40
|
+
toBeValid,
|
|
41
|
+
toBeVisible,
|
|
42
|
+
toContainElement,
|
|
43
|
+
toContainHTML,
|
|
44
|
+
toHaveAccessibleDescription,
|
|
45
|
+
toHaveAccessibleName,
|
|
46
|
+
toHaveAttribute,
|
|
47
|
+
toHaveClass,
|
|
48
|
+
toHaveDescription,
|
|
49
|
+
toHaveDisplayValue,
|
|
50
|
+
toHaveErrorMessage,
|
|
51
|
+
toHaveFocus,
|
|
52
|
+
toHaveFormValues,
|
|
53
|
+
toHaveStyle,
|
|
54
|
+
toHaveTextContent,
|
|
55
|
+
toHaveValue
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=matchers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "vitest";
|
|
2
|
+
import type { TestingLibraryMatchers } from "./dist/matchers";
|
|
3
|
+
|
|
4
|
+
declare module "vitest" {
|
|
5
|
+
interface Assertion<T = any>
|
|
6
|
+
extends TestingLibraryMatchers<(expected: string) => any, T> {}
|
|
7
|
+
interface AsymmetricMatchersContaining
|
|
8
|
+
extends TestingLibraryMatchers<unknown, unknown> {}
|
|
9
|
+
}
|
package/extend-expect.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./dist/extend-expect.js";
|
package/matchers.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./dist/matchers";
|
package/matchers.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/matchers.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@najemi-software/vitest-dom",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"description": "Custom Vitest matchers to test the state of the DOM, forked from jest-dom.",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Najemi-Software/vitest-dom.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/Najemi-Software/vitest-dom#readme",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": "Chance Stricklad <hi@chance.dev>",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"files": [
|
|
18
|
+
"CHANGELOG.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md",
|
|
21
|
+
"dist",
|
|
22
|
+
"extend-expect.d.ts",
|
|
23
|
+
"extend-expect.js",
|
|
24
|
+
"matchers.d.ts",
|
|
25
|
+
"matchers.js"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsup",
|
|
29
|
+
"test:dom": "vitest --config vitest.config.dom.ts",
|
|
30
|
+
"test:node": "vitest --config vitest.config.node.js",
|
|
31
|
+
"test": "run-p test:*",
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"format": "prettier --write '**/*.{ts,js}'"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"aria-query": "^5.3.0",
|
|
37
|
+
"chalk": "^5.3.0",
|
|
38
|
+
"css.escape": "^1.5.1",
|
|
39
|
+
"dom-accessibility-api": "^0.6.1",
|
|
40
|
+
"lodash-es": "^4.17.21",
|
|
41
|
+
"redent": "^4.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/aria-query": "^5.0.1",
|
|
45
|
+
"@types/css.escape": "^1.5.0",
|
|
46
|
+
"@types/lodash-es": "^4.17.9",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
48
|
+
"@typescript-eslint/parser": "^6.7.0",
|
|
49
|
+
"eslint": "^8.49.0",
|
|
50
|
+
"eslint-import-resolver-node": "^0.3.9",
|
|
51
|
+
"eslint-import-resolver-typescript": "^3.6.0",
|
|
52
|
+
"eslint-plugin-import": "^2.28.1",
|
|
53
|
+
"fast-glob": "^3.3.1",
|
|
54
|
+
"jsdom": "^21.0.0",
|
|
55
|
+
"npm-run-all": "^4.1.5",
|
|
56
|
+
"prettier": "^3.0.3",
|
|
57
|
+
"pretty-format": "^28.1.3",
|
|
58
|
+
"tsup": "^7.2.0",
|
|
59
|
+
"typescript": "^5.2.2",
|
|
60
|
+
"vitest": "^0.34.4"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"vitest": ">=0.31.0"
|
|
64
|
+
}
|
|
65
|
+
}
|