@m4l/testing 0.0.18 → 0.0.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/testing",
3
3
  "description": "Shared testing utilities for MFs",
4
- "version": "0.0.18",
4
+ "version": "0.0.19",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {
@@ -45,8 +45,8 @@
45
45
  "@testing-library/user-event": "^14.5.2",
46
46
  "@types/jest": "^29.5.10",
47
47
  "@vitejs/plugin-react": "^4.0.0",
48
- "@vitest/coverage-istanbul": "^3.1.1",
49
- "@vitest/coverage-v8": "^3.1.1",
48
+ "@vitest/coverage-istanbul": "3.1.1",
49
+ "@vitest/coverage-v8": "3.1.1",
50
50
  "@vitest/ui": "^3.1.1",
51
51
  "cypress": "^14.1.0",
52
52
  "cypress-vite": "1.6.0",
@@ -1,8 +1,8 @@
1
1
  import { expect as l } from "vitest";
2
- const h = (t) => t?.type === "nested", k = (t) => t?.type === "date", C = (t) => t?.type === "boolean", d = (t) => t?.type === "setCheck", n = (t) => t?.type === "price", p = (t) => t?.type === "points", y = (t) => t?.type === "uncertainty", f = (t) => t?.type === "concatenated", m = (t) => t?.type === "chipStatus", V = (t) => t?.type === "tags", I = (t) => t?.type === "icon", P = (t) => t?.type === "color", E = (t) => t?.type === "image", B = (t, r) => {
3
- l(t).toHaveLength(r.length), r.forEach((e, i) => {
4
- const o = t[i], u = e.hookCall?.type ?? "none";
5
- describe(`Column ${i + 1}: ${e.key} (${u})`, () => {
2
+ const h = (t) => t?.type === "nested", k = (t) => t?.type === "date", C = (t) => t?.type === "boolean", d = (t) => t?.type === "setCheck", n = (t) => t?.type === "price", p = (t) => t?.type === "points", y = (t) => t?.type === "uncertainty", f = (t) => t?.type === "concatenated", V = (t) => t?.type === "chipStatus", m = (t) => t?.type === "tags", I = (t) => t?.type === "icon", P = (t) => t?.type === "color", E = (t) => t?.type === "image", B = (t, r) => {
3
+ l(t).toHaveLength(r.length), r.forEach((e, u) => {
4
+ const o = t[u], i = e.hookCall?.type ?? "none";
5
+ describe(`Column ${u + 1}: ${e.key} (${i})`, () => {
6
6
  if (it("should have the correct basic properties", () => {
7
7
  l(o.key).toBe(e.key), l(o.name).toBe(e.name), l(o.type).toBe(e.type), l(o.align).toBe(e.align), l(o.width).toBe(e.width), l(o.visible).toBe(e.visible), e.fixed && l(o.fixed).toBe(e.fixed);
8
8
  }), e.hookCall) {
@@ -10,7 +10,8 @@ const h = (t) => t?.type === "nested", k = (t) => t?.type === "date", C = (t) =>
10
10
  it("should have the correct hook call properties", () => {
11
11
  if (h(e.hookCall))
12
12
  l(o.testProps).toEqual({
13
- fieldValue: e.hookCall.fieldValue
13
+ fieldValue: e.hookCall.fieldValue,
14
+ defaultValue: e.hookCall.defaultValue
14
15
  });
15
16
  else if (k(e.hookCall))
16
17
  l(o.testProps).toEqual({
@@ -49,14 +50,14 @@ const h = (t) => t?.type === "nested", k = (t) => t?.type === "date", C = (t) =>
49
50
  fieldValue: e.hookCall.fieldValue,
50
51
  fieldSeparator: e.hookCall.fieldSeparator
51
52
  });
52
- else if (m(e.hookCall))
53
+ else if (V(e.hookCall))
53
54
  l(o.testProps).toEqual({
54
55
  fieldLabel: typeof e.hookCall.fieldLabel == "function" ? l.any(Function) : e.hookCall.fieldLabel,
55
56
  fieldStatus: e.hookCall.fieldStatus,
56
57
  statusesColors: e.hookCall.statusesColors,
57
58
  fallbackColor: e.hookCall.fallbackColor
58
59
  });
59
- else if (V(e.hookCall))
60
+ else if (m(e.hookCall))
60
61
  l(o.testProps).toEqual({
61
62
  fieldValue: e.hookCall.fieldValue
62
63
  });