@najemi-software/vitest-dom 0.13.0 → 0.14.0

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.
Files changed (94) hide show
  1. package/dist/extend-expect.d.ts +1 -3
  2. package/dist/extend-expect.js +2 -6
  3. package/dist/extend-expect.js.map +1 -1
  4. package/dist/matchers/css-parse.d.ts +30 -0
  5. package/dist/matchers/css-parse.js +514 -0
  6. package/dist/matchers/css-parse.js.map +1 -0
  7. package/dist/matchers/to-be-checked.d.ts +2 -0
  8. package/dist/matchers/to-be-checked.js +52 -0
  9. package/dist/matchers/to-be-checked.js.map +1 -0
  10. package/dist/matchers/to-be-disabled.d.ts +3 -0
  11. package/dist/matchers/to-be-disabled.js +74 -0
  12. package/dist/matchers/to-be-disabled.js.map +1 -0
  13. package/dist/matchers/to-be-empty-dom-element.d.ts +2 -0
  14. package/dist/matchers/to-be-empty-dom-element.js +31 -0
  15. package/dist/matchers/to-be-empty-dom-element.js.map +1 -0
  16. package/dist/matchers/to-be-empty.d.ts +3 -0
  17. package/dist/matchers/to-be-empty.js +18 -0
  18. package/dist/matchers/to-be-empty.js.map +1 -0
  19. package/dist/matchers/to-be-in-the-document.d.ts +2 -0
  20. package/dist/matchers/to-be-in-the-document.js +24 -0
  21. package/dist/matchers/to-be-in-the-document.js.map +1 -0
  22. package/dist/matchers/to-be-in-the-dom.d.ts +3 -0
  23. package/dist/matchers/to-be-in-the-dom.js +23 -0
  24. package/dist/matchers/to-be-in-the-dom.js.map +1 -0
  25. package/dist/matchers/to-be-invalid.d.ts +3 -0
  26. package/dist/matchers/to-be-invalid.js +50 -0
  27. package/dist/matchers/to-be-invalid.js.map +1 -0
  28. package/dist/matchers/to-be-partially-checked.d.ts +2 -0
  29. package/dist/matchers/to-be-partially-checked.js +36 -0
  30. package/dist/matchers/to-be-partially-checked.js.map +1 -0
  31. package/dist/matchers/to-be-required.d.ts +2 -0
  32. package/dist/matchers/to-be-required.js +40 -0
  33. package/dist/matchers/to-be-required.js.map +1 -0
  34. package/dist/matchers/to-be-visible.d.ts +2 -0
  35. package/dist/matchers/to-be-visible.js +46 -0
  36. package/dist/matchers/to-be-visible.js.map +1 -0
  37. package/dist/matchers/to-contain-element.d.ts +2 -0
  38. package/dist/matchers/to-contain-element.js +19 -0
  39. package/dist/matchers/to-contain-element.js.map +1 -0
  40. package/dist/matchers/to-contain-html.d.ts +2 -0
  41. package/dist/matchers/to-contain-html.js +25 -0
  42. package/dist/matchers/to-contain-html.js.map +1 -0
  43. package/dist/matchers/to-have-accessible-description.d.ts +4 -0
  44. package/dist/matchers/to-have-accessible-description.js +28 -0
  45. package/dist/matchers/to-have-accessible-description.js.map +1 -0
  46. package/dist/matchers/to-have-accessible-errormessage.d.ts +2 -0
  47. package/dist/matchers/to-have-accessible-errormessage.js +48 -0
  48. package/dist/matchers/to-have-accessible-errormessage.js.map +1 -0
  49. package/dist/matchers/to-have-accessible-name.d.ts +3 -0
  50. package/dist/matchers/to-have-accessible-name.js +27 -0
  51. package/dist/matchers/to-have-accessible-name.js.map +1 -0
  52. package/dist/matchers/to-have-attribute.d.ts +2 -0
  53. package/dist/matchers/to-have-attribute.js +34 -0
  54. package/dist/matchers/to-have-attribute.js.map +1 -0
  55. package/dist/matchers/to-have-class.d.ts +2 -0
  56. package/dist/matchers/to-have-class.js +56 -0
  57. package/dist/matchers/to-have-class.js.map +1 -0
  58. package/dist/matchers/to-have-description.d.ts +4 -0
  59. package/dist/matchers/to-have-description.js +30 -0
  60. package/dist/matchers/to-have-description.js.map +1 -0
  61. package/dist/matchers/to-have-display-value.d.ts +2 -0
  62. package/dist/matchers/to-have-display-value.js +31 -0
  63. package/dist/matchers/to-have-display-value.js.map +1 -0
  64. package/dist/matchers/to-have-errormessage.d.ts +3 -0
  65. package/dist/matchers/to-have-errormessage.js +39 -0
  66. package/dist/matchers/to-have-errormessage.js.map +1 -0
  67. package/dist/matchers/to-have-focus.d.ts +2 -0
  68. package/dist/matchers/to-have-focus.js +22 -0
  69. package/dist/matchers/to-have-focus.js.map +1 -0
  70. package/dist/matchers/to-have-form-values.d.ts +2 -0
  71. package/dist/matchers/to-have-form-values.js +67 -0
  72. package/dist/matchers/to-have-form-values.js.map +1 -0
  73. package/dist/matchers/to-have-style.d.ts +2 -0
  74. package/dist/matchers/to-have-style.js +59 -0
  75. package/dist/matchers/to-have-style.js.map +1 -0
  76. package/dist/matchers/to-have-text-content.d.ts +4 -0
  77. package/dist/matchers/to-have-text-content.js +18 -0
  78. package/dist/matchers/to-have-text-content.js.map +1 -0
  79. package/dist/matchers/to-have-value.d.ts +2 -0
  80. package/dist/matchers/to-have-value.js +27 -0
  81. package/dist/matchers/to-have-value.js.map +1 -0
  82. package/dist/matchers/types.d.ts +13 -0
  83. package/dist/matchers/types.js +2 -0
  84. package/dist/matchers/types.js.map +1 -0
  85. package/dist/matchers/utils.d.ts +43 -0
  86. package/dist/matchers/utils.js +217 -0
  87. package/dist/matchers/utils.js.map +1 -0
  88. package/dist/matchers.d.ts +682 -83
  89. package/dist/matchers.js +25 -56
  90. package/dist/matchers.js.map +1 -1
  91. package/package.json +9 -5
  92. package/dist/chunk-DARZWRGS.js +0 -1546
  93. package/dist/chunk-DARZWRGS.js.map +0 -1
  94. package/dist/matchers-CEKfObS0.d.ts +0 -661
package/dist/matchers.js CHANGED
@@ -1,57 +1,26 @@
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-DARZWRGS.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
- };
1
+ import { toBeChecked } from "./matchers/to-be-checked.js";
2
+ import { toBeDisabled, toBeEnabled } from "./matchers/to-be-disabled.js";
3
+ import { toBeEmptyDOMElement } from "./matchers/to-be-empty-dom-element.js";
4
+ import { toBeEmpty } from "./matchers/to-be-empty.js";
5
+ import { toBeInTheDocument } from "./matchers/to-be-in-the-document.js";
6
+ import { toBeInTheDOM } from "./matchers/to-be-in-the-dom.js";
7
+ import { toBeInvalid, toBeValid } from "./matchers/to-be-invalid.js";
8
+ import { toBePartiallyChecked } from "./matchers/to-be-partially-checked.js";
9
+ import { toBeRequired } from "./matchers/to-be-required.js";
10
+ import { toBeVisible } from "./matchers/to-be-visible.js";
11
+ import { toContainElement } from "./matchers/to-contain-element.js";
12
+ import { toContainHTML } from "./matchers/to-contain-html.js";
13
+ import { toHaveAccessibleDescription } from "./matchers/to-have-accessible-description.js";
14
+ import { toHaveAccessibleName } from "./matchers/to-have-accessible-name.js";
15
+ import { toHaveAttribute } from "./matchers/to-have-attribute.js";
16
+ import { toHaveClass } from "./matchers/to-have-class.js";
17
+ import { toHaveDescription } from "./matchers/to-have-description.js";
18
+ import { toHaveDisplayValue } from "./matchers/to-have-display-value.js";
19
+ import { toHaveErrorMessage } from "./matchers/to-have-errormessage.js";
20
+ import { toHaveFocus } from "./matchers/to-have-focus.js";
21
+ import { toHaveFormValues } from "./matchers/to-have-form-values.js";
22
+ import { toHaveStyle } from "./matchers/to-have-style.js";
23
+ import { toHaveTextContent } from "./matchers/to-have-text-content.js";
24
+ import { toHaveValue } from "./matchers/to-have-value.js";
25
+ export { toBeInTheDOM, toBeInTheDocument, toBeEmpty, toBeEmptyDOMElement, toContainElement, toContainHTML, toHaveTextContent, toHaveAccessibleDescription, toHaveAccessibleName, toHaveAttribute, toHaveClass, toHaveStyle, toHaveFocus, toHaveFormValues, toBeVisible, toBeDisabled, toBeEnabled, toBeRequired, toBeInvalid, toBeValid, toHaveValue, toHaveDisplayValue, toBeChecked, toBePartiallyChecked, toHaveDescription, toHaveErrorMessage, };
57
26
  //# sourceMappingURL=matchers.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"matchers.js","sourceRoot":"","sources":["../src/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EACH,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,2BAA2B,EAC3B,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@najemi-software/vitest-dom",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "private": false,
5
5
  "description": "Custom Vitest matchers to test the state of the DOM, forked from jest-dom.",
6
6
  "homepage": "https://github.com/Najemi-Software/vitest-dom#readme",
@@ -45,13 +45,18 @@
45
45
  "access": "public"
46
46
  },
47
47
  "scripts": {
48
- "build": "tsup",
48
+ "build": "pnpm run clean && pnpm run build-ts",
49
+ "build-check": "tsc",
50
+ "build-future": "pnpm run clean && npm-run-all -p build-ts build-check",
51
+ "build-ts": "tsc -p tsconfig.build.json",
52
+ "clean": "rm -rf ./dist",
49
53
  "format": "oxfmt --check",
50
54
  "format-fix": "oxfmt",
51
55
  "lint": "eslint .",
52
56
  "lint-fix": "eslint . --fix",
53
57
  "test": "vitest",
54
- "test-once": "vitest run --silent"
58
+ "test-once": "vitest run --silent",
59
+ "validate": "pnpm run lint && pnpm run format"
55
60
  },
56
61
  "dependencies": {
57
62
  "chalk": "^5.3.0",
@@ -69,10 +74,9 @@
69
74
  "eslint-plugin-import": "^2.28.1",
70
75
  "fast-glob": "^3.3.1",
71
76
  "happy-dom": "20.14.5",
72
- "npm-run-all": "^4.1.5",
77
+ "npm-run-all": "4.1.5",
73
78
  "oxfmt": "^0.70.0",
74
79
  "pretty-format": "^28.1.3",
75
- "tsup": "^7.2.0",
76
80
  "typescript": "^5.2.2",
77
81
  "vitest": "^0.34.4"
78
82
  },