@m4l/testing 0.0.19 → 0.0.20

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.19",
4
+ "version": "0.0.20",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {
@@ -1,17 +1,18 @@
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", 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) => {
2
+ const i = (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
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})`, () => {
4
+ const o = t[u], h = e.hookCall?.type ?? "none";
5
+ describe(`Column ${u + 1}: ${e.key} (${h})`, () => {
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) {
9
9
  let a = !0, s = !0;
10
10
  it("should have the correct hook call properties", () => {
11
- if (h(e.hookCall))
11
+ if (i(e.hookCall))
12
12
  l(o.testProps).toEqual({
13
13
  fieldValue: e.hookCall.fieldValue,
14
- defaultValue: e.hookCall.defaultValue
14
+ defaultValue: e.hookCall.defaultValue,
15
+ Component: e.hookCall.Component
15
16
  });
16
17
  else if (k(e.hookCall))
17
18
  l(o.testProps).toEqual({
@@ -50,14 +51,14 @@ const h = (t) => t?.type === "nested", k = (t) => t?.type === "date", C = (t) =>
50
51
  fieldValue: e.hookCall.fieldValue,
51
52
  fieldSeparator: e.hookCall.fieldSeparator
52
53
  });
53
- else if (V(e.hookCall))
54
+ else if (m(e.hookCall))
54
55
  l(o.testProps).toEqual({
55
56
  fieldLabel: typeof e.hookCall.fieldLabel == "function" ? l.any(Function) : e.hookCall.fieldLabel,
56
57
  fieldStatus: e.hookCall.fieldStatus,
57
58
  statusesColors: e.hookCall.statusesColors,
58
59
  fallbackColor: e.hookCall.fallbackColor
59
60
  });
60
- else if (m(e.hookCall))
61
+ else if (V(e.hookCall))
61
62
  l(o.testProps).toEqual({
62
63
  fieldValue: e.hookCall.fieldValue
63
64
  });