@traqula/test-utils 0.0.1-alpha.148 → 0.0.1-alpha.176

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/lib/index.cjs CHANGED
@@ -99,7 +99,7 @@ var require_dist = __commonJS({
99
99
  o[k2] = m2[k];
100
100
  });
101
101
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
102
- for (var p3 in m2) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m2, p3);
102
+ for (var p2 in m2) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p2)) __createBinding(exports3, m2, p2);
103
103
  };
104
104
  Object.defineProperty(exports2, "__esModule", { value: true });
105
105
  exports2.expectTypeOf = void 0;
@@ -163,7 +163,8 @@ var index_exports = {};
163
163
  __export(index_exports, {
164
164
  importSparql11NoteTests: () => importSparql11NoteTests,
165
165
  negativeTest: () => negativeTest,
166
- positiveTest: () => positiveTest
166
+ positiveTest: () => positiveTest,
167
+ readFile: () => readFile
167
168
  });
168
169
  module.exports = __toCommonJS(index_exports);
169
170
 
@@ -223,34 +224,51 @@ function C(n = false) {
223
224
  }
224
225
  function p(n = false) {
225
226
  let e = C(n), i = (r2, t, c, o) => {
226
- let l = "", s = 0;
227
+ let l = "", s2 = 0;
227
228
  do
228
- l += r2.substring(s, o) + c, s = o + t.length, o = r2.indexOf(t, s);
229
+ l += r2.substring(s2, o) + c, s2 = o + t.length, o = r2.indexOf(t, s2);
229
230
  while (~o);
230
- return l + r2.substring(s);
231
+ return l + r2.substring(s2);
231
232
  }, g = (r2, t, c = r2) => {
232
233
  let o = (l) => {
233
- let s = String(l), b = s.indexOf(t, r2.length);
234
- return ~b ? r2 + i(s, t, c, b) + t : r2 + s + t;
234
+ let s2 = String(l), b = s2.indexOf(t, r2.length);
235
+ return ~b ? r2 + i(s2, t, c, b) + t : r2 + s2 + t;
235
236
  };
236
237
  return o.open = r2, o.close = t, o;
237
- }, u = {
238
+ }, u2 = {
238
239
  isColorSupported: e
239
240
  }, d = (r2) => `\x1B[${r2}m`;
240
241
  for (let [r2, t] of h)
241
- u[r2] = e ? g(
242
+ u2[r2] = e ? g(
242
243
  d(t[0]),
243
244
  d(t[1]),
244
245
  t[2]
245
246
  ) : a;
246
- return u;
247
+ return u2;
247
248
  }
248
249
 
249
250
  // ../../node_modules/tinyrainbow/dist/node.js
250
251
  var import_tty = require("tty");
251
- var p2 = p((0, import_tty.isatty)(1));
252
+ var r = process.env.FORCE_TTY !== void 0 || (0, import_tty.isatty)(1);
253
+ var u = p(r);
252
254
 
253
255
  // ../../node_modules/@vitest/pretty-format/dist/index.js
256
+ function _mergeNamespaces(n, m2) {
257
+ m2.forEach(function(e) {
258
+ e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
259
+ if (k !== "default" && !(k in n)) {
260
+ var d = Object.getOwnPropertyDescriptor(e, k);
261
+ Object.defineProperty(n, k, d.get ? d : {
262
+ enumerable: true,
263
+ get: function() {
264
+ return e[k];
265
+ }
266
+ });
267
+ }
268
+ });
269
+ });
270
+ return Object.freeze(n);
271
+ }
254
272
  function getKeysOfEnumerableProperties(object, compareKeys) {
255
273
  const rawKeys = Object.keys(object);
256
274
  const keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys);
@@ -708,14 +726,219 @@ var serialize$2 = (val, config2, indentation, depth, refs, printer) => {
708
726
  };
709
727
  var test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
710
728
  var plugin$2 = { serialize: serialize$2, test: test$2 };
729
+ function getDefaultExportFromCjs(x) {
730
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
731
+ }
732
+ var reactIs$1 = { exports: {} };
733
+ var reactIs_production = {};
734
+ var hasRequiredReactIs_production;
735
+ function requireReactIs_production() {
736
+ if (hasRequiredReactIs_production) return reactIs_production;
737
+ hasRequiredReactIs_production = 1;
738
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
739
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
740
+ function typeOf(object) {
741
+ if ("object" === typeof object && null !== object) {
742
+ var $$typeof = object.$$typeof;
743
+ switch ($$typeof) {
744
+ case REACT_ELEMENT_TYPE:
745
+ switch (object = object.type, object) {
746
+ case REACT_FRAGMENT_TYPE:
747
+ case REACT_PROFILER_TYPE:
748
+ case REACT_STRICT_MODE_TYPE:
749
+ case REACT_SUSPENSE_TYPE:
750
+ case REACT_SUSPENSE_LIST_TYPE:
751
+ return object;
752
+ default:
753
+ switch (object = object && object.$$typeof, object) {
754
+ case REACT_CONTEXT_TYPE:
755
+ case REACT_FORWARD_REF_TYPE:
756
+ case REACT_LAZY_TYPE:
757
+ case REACT_MEMO_TYPE:
758
+ return object;
759
+ case REACT_CONSUMER_TYPE:
760
+ return object;
761
+ default:
762
+ return $$typeof;
763
+ }
764
+ }
765
+ case REACT_PORTAL_TYPE:
766
+ return $$typeof;
767
+ }
768
+ }
769
+ }
770
+ reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
771
+ reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
772
+ reactIs_production.Element = REACT_ELEMENT_TYPE;
773
+ reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
774
+ reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
775
+ reactIs_production.Lazy = REACT_LAZY_TYPE;
776
+ reactIs_production.Memo = REACT_MEMO_TYPE;
777
+ reactIs_production.Portal = REACT_PORTAL_TYPE;
778
+ reactIs_production.Profiler = REACT_PROFILER_TYPE;
779
+ reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
780
+ reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
781
+ reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
782
+ reactIs_production.isContextConsumer = function(object) {
783
+ return typeOf(object) === REACT_CONSUMER_TYPE;
784
+ };
785
+ reactIs_production.isContextProvider = function(object) {
786
+ return typeOf(object) === REACT_CONTEXT_TYPE;
787
+ };
788
+ reactIs_production.isElement = function(object) {
789
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
790
+ };
791
+ reactIs_production.isForwardRef = function(object) {
792
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
793
+ };
794
+ reactIs_production.isFragment = function(object) {
795
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
796
+ };
797
+ reactIs_production.isLazy = function(object) {
798
+ return typeOf(object) === REACT_LAZY_TYPE;
799
+ };
800
+ reactIs_production.isMemo = function(object) {
801
+ return typeOf(object) === REACT_MEMO_TYPE;
802
+ };
803
+ reactIs_production.isPortal = function(object) {
804
+ return typeOf(object) === REACT_PORTAL_TYPE;
805
+ };
806
+ reactIs_production.isProfiler = function(object) {
807
+ return typeOf(object) === REACT_PROFILER_TYPE;
808
+ };
809
+ reactIs_production.isStrictMode = function(object) {
810
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
811
+ };
812
+ reactIs_production.isSuspense = function(object) {
813
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
814
+ };
815
+ reactIs_production.isSuspenseList = function(object) {
816
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
817
+ };
818
+ reactIs_production.isValidElementType = function(type3) {
819
+ return "string" === typeof type3 || "function" === typeof type3 || type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || type3 === REACT_OFFSCREEN_TYPE || "object" === typeof type3 && null !== type3 && (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_CONSUMER_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || type3.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type3.getModuleId) ? true : false;
820
+ };
821
+ reactIs_production.typeOf = typeOf;
822
+ return reactIs_production;
823
+ }
824
+ var reactIs_development$1 = {};
825
+ var hasRequiredReactIs_development$1;
826
+ function requireReactIs_development$1() {
827
+ if (hasRequiredReactIs_development$1) return reactIs_development$1;
828
+ hasRequiredReactIs_development$1 = 1;
829
+ "production" !== process.env.NODE_ENV && function() {
830
+ function typeOf(object) {
831
+ if ("object" === typeof object && null !== object) {
832
+ var $$typeof = object.$$typeof;
833
+ switch ($$typeof) {
834
+ case REACT_ELEMENT_TYPE:
835
+ switch (object = object.type, object) {
836
+ case REACT_FRAGMENT_TYPE:
837
+ case REACT_PROFILER_TYPE:
838
+ case REACT_STRICT_MODE_TYPE:
839
+ case REACT_SUSPENSE_TYPE:
840
+ case REACT_SUSPENSE_LIST_TYPE:
841
+ return object;
842
+ default:
843
+ switch (object = object && object.$$typeof, object) {
844
+ case REACT_CONTEXT_TYPE:
845
+ case REACT_FORWARD_REF_TYPE:
846
+ case REACT_LAZY_TYPE:
847
+ case REACT_MEMO_TYPE:
848
+ return object;
849
+ case REACT_CONSUMER_TYPE:
850
+ return object;
851
+ default:
852
+ return $$typeof;
853
+ }
854
+ }
855
+ case REACT_PORTAL_TYPE:
856
+ return $$typeof;
857
+ }
858
+ }
859
+ }
860
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
861
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
862
+ reactIs_development$1.ContextConsumer = REACT_CONSUMER_TYPE;
863
+ reactIs_development$1.ContextProvider = REACT_CONTEXT_TYPE;
864
+ reactIs_development$1.Element = REACT_ELEMENT_TYPE;
865
+ reactIs_development$1.ForwardRef = REACT_FORWARD_REF_TYPE;
866
+ reactIs_development$1.Fragment = REACT_FRAGMENT_TYPE;
867
+ reactIs_development$1.Lazy = REACT_LAZY_TYPE;
868
+ reactIs_development$1.Memo = REACT_MEMO_TYPE;
869
+ reactIs_development$1.Portal = REACT_PORTAL_TYPE;
870
+ reactIs_development$1.Profiler = REACT_PROFILER_TYPE;
871
+ reactIs_development$1.StrictMode = REACT_STRICT_MODE_TYPE;
872
+ reactIs_development$1.Suspense = REACT_SUSPENSE_TYPE;
873
+ reactIs_development$1.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
874
+ reactIs_development$1.isContextConsumer = function(object) {
875
+ return typeOf(object) === REACT_CONSUMER_TYPE;
876
+ };
877
+ reactIs_development$1.isContextProvider = function(object) {
878
+ return typeOf(object) === REACT_CONTEXT_TYPE;
879
+ };
880
+ reactIs_development$1.isElement = function(object) {
881
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
882
+ };
883
+ reactIs_development$1.isForwardRef = function(object) {
884
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
885
+ };
886
+ reactIs_development$1.isFragment = function(object) {
887
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
888
+ };
889
+ reactIs_development$1.isLazy = function(object) {
890
+ return typeOf(object) === REACT_LAZY_TYPE;
891
+ };
892
+ reactIs_development$1.isMemo = function(object) {
893
+ return typeOf(object) === REACT_MEMO_TYPE;
894
+ };
895
+ reactIs_development$1.isPortal = function(object) {
896
+ return typeOf(object) === REACT_PORTAL_TYPE;
897
+ };
898
+ reactIs_development$1.isProfiler = function(object) {
899
+ return typeOf(object) === REACT_PROFILER_TYPE;
900
+ };
901
+ reactIs_development$1.isStrictMode = function(object) {
902
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
903
+ };
904
+ reactIs_development$1.isSuspense = function(object) {
905
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
906
+ };
907
+ reactIs_development$1.isSuspenseList = function(object) {
908
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
909
+ };
910
+ reactIs_development$1.isValidElementType = function(type3) {
911
+ return "string" === typeof type3 || "function" === typeof type3 || type3 === REACT_FRAGMENT_TYPE || type3 === REACT_PROFILER_TYPE || type3 === REACT_STRICT_MODE_TYPE || type3 === REACT_SUSPENSE_TYPE || type3 === REACT_SUSPENSE_LIST_TYPE || type3 === REACT_OFFSCREEN_TYPE || "object" === typeof type3 && null !== type3 && (type3.$$typeof === REACT_LAZY_TYPE || type3.$$typeof === REACT_MEMO_TYPE || type3.$$typeof === REACT_CONTEXT_TYPE || type3.$$typeof === REACT_CONSUMER_TYPE || type3.$$typeof === REACT_FORWARD_REF_TYPE || type3.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type3.getModuleId) ? true : false;
912
+ };
913
+ reactIs_development$1.typeOf = typeOf;
914
+ }();
915
+ return reactIs_development$1;
916
+ }
917
+ var hasRequiredReactIs$1;
918
+ function requireReactIs$1() {
919
+ if (hasRequiredReactIs$1) return reactIs$1.exports;
920
+ hasRequiredReactIs$1 = 1;
921
+ if (process.env.NODE_ENV === "production") {
922
+ reactIs$1.exports = requireReactIs_production();
923
+ } else {
924
+ reactIs$1.exports = requireReactIs_development$1();
925
+ }
926
+ return reactIs$1.exports;
927
+ }
928
+ var reactIsExports$1 = /* @__PURE__ */ requireReactIs$1();
929
+ var index$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports$1);
930
+ var ReactIs19 = /* @__PURE__ */ _mergeNamespaces({
931
+ __proto__: null,
932
+ default: index$1
933
+ }, [reactIsExports$1]);
711
934
  var reactIs = { exports: {} };
712
935
  var reactIs_production_min = {};
713
936
  var hasRequiredReactIs_production_min;
714
937
  function requireReactIs_production_min() {
715
938
  if (hasRequiredReactIs_production_min) return reactIs_production_min;
716
939
  hasRequiredReactIs_production_min = 1;
717
- var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h2 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p3 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
718
- u = Symbol.for("react.module.reference");
940
+ var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h2 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m2 = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u2;
941
+ u2 = Symbol.for("react.module.reference");
719
942
  function v(a2) {
720
943
  if ("object" === typeof a2 && null !== a2) {
721
944
  var r2 = a2.$$typeof;
@@ -734,7 +957,7 @@ function requireReactIs_production_min() {
734
957
  case h2:
735
958
  case l:
736
959
  case q:
737
- case p3:
960
+ case p2:
738
961
  case g:
739
962
  return a2;
740
963
  default:
@@ -752,7 +975,7 @@ function requireReactIs_production_min() {
752
975
  reactIs_production_min.ForwardRef = l;
753
976
  reactIs_production_min.Fragment = d;
754
977
  reactIs_production_min.Lazy = q;
755
- reactIs_production_min.Memo = p3;
978
+ reactIs_production_min.Memo = p2;
756
979
  reactIs_production_min.Portal = c;
757
980
  reactIs_production_min.Profiler = f2;
758
981
  reactIs_production_min.StrictMode = e;
@@ -783,7 +1006,7 @@ function requireReactIs_production_min() {
783
1006
  return v(a2) === q;
784
1007
  };
785
1008
  reactIs_production_min.isMemo = function(a2) {
786
- return v(a2) === p3;
1009
+ return v(a2) === p2;
787
1010
  };
788
1011
  reactIs_production_min.isPortal = function(a2) {
789
1012
  return v(a2) === c;
@@ -801,7 +1024,7 @@ function requireReactIs_production_min() {
801
1024
  return v(a2) === n;
802
1025
  };
803
1026
  reactIs_production_min.isValidElementType = function(a2) {
804
- return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f2 || a2 === e || a2 === m2 || a2 === n || a2 === t || "object" === typeof a2 && null !== a2 && (a2.$$typeof === q || a2.$$typeof === p3 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u || void 0 !== a2.getModuleId) ? true : false;
1027
+ return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f2 || a2 === e || a2 === m2 || a2 === n || a2 === t || "object" === typeof a2 && null !== a2 && (a2.$$typeof === q || a2.$$typeof === p2 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u2 || void 0 !== a2.getModuleId) ? true : false;
805
1028
  };
806
1029
  reactIs_production_min.typeOf = v;
807
1030
  return reactIs_production_min;
@@ -999,6 +1222,31 @@ function requireReactIs() {
999
1222
  return reactIs.exports;
1000
1223
  }
1001
1224
  var reactIsExports = requireReactIs();
1225
+ var index = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports);
1226
+ var ReactIs18 = /* @__PURE__ */ _mergeNamespaces({
1227
+ __proto__: null,
1228
+ default: index
1229
+ }, [reactIsExports]);
1230
+ var reactIsMethods = [
1231
+ "isAsyncMode",
1232
+ "isConcurrentMode",
1233
+ "isContextConsumer",
1234
+ "isContextProvider",
1235
+ "isElement",
1236
+ "isForwardRef",
1237
+ "isFragment",
1238
+ "isLazy",
1239
+ "isMemo",
1240
+ "isPortal",
1241
+ "isProfiler",
1242
+ "isStrictMode",
1243
+ "isSuspense",
1244
+ "isSuspenseList",
1245
+ "isValidElementType"
1246
+ ];
1247
+ var ReactIs = Object.fromEntries(
1248
+ reactIsMethods.map((m2) => [m2, (v) => ReactIs18[m2](v) || ReactIs19[m2](v)])
1249
+ );
1002
1250
  function getChildren(arg, children = []) {
1003
1251
  if (Array.isArray(arg)) {
1004
1252
  for (const item of arg) {
@@ -1017,27 +1265,27 @@ function getType(element) {
1017
1265
  if (typeof type3 === "function") {
1018
1266
  return type3.displayName || type3.name || "Unknown";
1019
1267
  }
1020
- if (reactIsExports.isFragment(element)) {
1268
+ if (ReactIs.isFragment(element)) {
1021
1269
  return "React.Fragment";
1022
1270
  }
1023
- if (reactIsExports.isSuspense(element)) {
1271
+ if (ReactIs.isSuspense(element)) {
1024
1272
  return "React.Suspense";
1025
1273
  }
1026
1274
  if (typeof type3 === "object" && type3 !== null) {
1027
- if (reactIsExports.isContextProvider(element)) {
1275
+ if (ReactIs.isContextProvider(element)) {
1028
1276
  return "Context.Provider";
1029
1277
  }
1030
- if (reactIsExports.isContextConsumer(element)) {
1278
+ if (ReactIs.isContextConsumer(element)) {
1031
1279
  return "Context.Consumer";
1032
1280
  }
1033
- if (reactIsExports.isForwardRef(element)) {
1281
+ if (ReactIs.isForwardRef(element)) {
1034
1282
  if (type3.displayName) {
1035
1283
  return type3.displayName;
1036
1284
  }
1037
1285
  const functionName = type3.render.displayName || type3.render.name || "";
1038
1286
  return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`;
1039
1287
  }
1040
- if (reactIsExports.isMemo(element)) {
1288
+ if (ReactIs.isMemo(element)) {
1041
1289
  const functionName = type3.displayName || type3.type.displayName || type3.type.name || "";
1042
1290
  return functionName === "" ? "Memo" : `Memo(${functionName})`;
1043
1291
  }
@@ -1070,7 +1318,7 @@ var serialize$1 = (element, config2, indentation, depth, refs, printer) => ++dep
1070
1318
  config2,
1071
1319
  indentation
1072
1320
  );
1073
- var test$1 = (val) => val != null && reactIsExports.isElement(val);
1321
+ var test$1 = (val) => val != null && ReactIs.isElement(val);
1074
1322
  var plugin$1 = { serialize: serialize$1, test: test$1 };
1075
1323
  var testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
1076
1324
  function getPropKeys(object) {
@@ -1104,6 +1352,35 @@ var plugin = { serialize, test };
1104
1352
  var toISOString = Date.prototype.toISOString;
1105
1353
  var errorToString = Error.prototype.toString;
1106
1354
  var regExpToString = RegExp.prototype.toString;
1355
+ function getConstructorName(val) {
1356
+ return typeof val.constructor === "function" && val.constructor.name || "Object";
1357
+ }
1358
+ var ErrorPlugin = {
1359
+ test: (val) => val && val instanceof Error,
1360
+ serialize(val, config2, indentation, depth, refs, printer2) {
1361
+ if (refs.includes(val)) {
1362
+ return "[Circular]";
1363
+ }
1364
+ refs = [...refs, val];
1365
+ const hitMaxDepth = ++depth > config2.maxDepth;
1366
+ const { message, cause, ...rest } = val;
1367
+ const entries = {
1368
+ message,
1369
+ ...typeof cause !== "undefined" ? { cause } : {},
1370
+ ...val instanceof AggregateError ? { errors: val.errors } : {},
1371
+ ...rest
1372
+ };
1373
+ const name = val.name !== "Error" ? val.name : getConstructorName(val);
1374
+ return hitMaxDepth ? `[${name}]` : `${name} {${printIteratorEntries(
1375
+ Object.entries(entries).values(),
1376
+ config2,
1377
+ indentation,
1378
+ depth,
1379
+ refs,
1380
+ printer2
1381
+ )}}`;
1382
+ }
1383
+ };
1107
1384
  var DEFAULT_THEME = {
1108
1385
  comment: "gray",
1109
1386
  content: "reset",
@@ -1133,7 +1410,8 @@ var plugins = {
1133
1410
  DOMElement: plugin$3,
1134
1411
  Immutable: plugin$2,
1135
1412
  ReactElement: plugin$1,
1136
- ReactTestComponent: plugin
1413
+ ReactTestComponent: plugin,
1414
+ Error: ErrorPlugin
1137
1415
  };
1138
1416
 
1139
1417
  // ../../node_modules/loupe/lib/helpers.js
@@ -1376,10 +1654,8 @@ function mapToEntries(map) {
1376
1654
  return entries;
1377
1655
  }
1378
1656
  function inspectMap(map, options) {
1379
- const size = map.size - 1;
1380
- if (size <= 0) {
1657
+ if (map.size === 0)
1381
1658
  return "Map{}";
1382
- }
1383
1659
  options.truncate -= 7;
1384
1660
  return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
1385
1661
  }
@@ -1847,11 +2123,11 @@ function toArray(array) {
1847
2123
  function isObject(item) {
1848
2124
  return item != null && typeof item === "object" && !Array.isArray(item);
1849
2125
  }
1850
- function objectAttr(source, path, defaultValue = void 0) {
1851
- const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
2126
+ function objectAttr(source, path2, defaultValue = void 0) {
2127
+ const paths = path2.replace(/\[(\d+)\]/g, ".$1").split(".");
1852
2128
  let result = source;
1853
- for (const p3 of paths) {
1854
- result = new Object(result)[p3];
2129
+ for (const p2 of paths) {
2130
+ result = new Object(result)[p2];
1855
2131
  if (result === void 0) {
1856
2132
  return defaultValue;
1857
2133
  }
@@ -1861,13 +2137,13 @@ function objectAttr(source, path, defaultValue = void 0) {
1861
2137
  function createDefer() {
1862
2138
  let resolve2 = null;
1863
2139
  let reject = null;
1864
- const p3 = new Promise((_resolve, _reject) => {
2140
+ const p2 = new Promise((_resolve, _reject) => {
1865
2141
  resolve2 = _resolve;
1866
2142
  reject = _reject;
1867
2143
  });
1868
- p3.resolve = resolve2;
1869
- p3.reject = reject;
1870
- return p3;
2144
+ p2.resolve = resolve2;
2145
+ p2.reject = reject;
2146
+ return p2;
1871
2147
  }
1872
2148
  function isNegativeNaN(val) {
1873
2149
  if (!Number.isNaN(val)) {
@@ -2335,7 +2611,8 @@ function getSafeTimers() {
2335
2611
  clearInterval: safeClearInterval,
2336
2612
  clearTimeout: safeClearTimeout,
2337
2613
  setImmediate: safeSetImmediate,
2338
- clearImmediate: safeClearImmediate
2614
+ clearImmediate: safeClearImmediate,
2615
+ queueMicrotask: safeQueueMicrotask
2339
2616
  } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
2340
2617
  const { nextTick: safeNextTick } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis.process || { nextTick: (cb) => cb() };
2341
2618
  return {
@@ -2345,7 +2622,8 @@ function getSafeTimers() {
2345
2622
  clearInterval: safeClearInterval,
2346
2623
  clearTimeout: safeClearTimeout,
2347
2624
  setImmediate: safeSetImmediate,
2348
- clearImmediate: safeClearImmediate
2625
+ clearImmediate: safeClearImmediate,
2626
+ queueMicrotask: safeQueueMicrotask
2349
2627
  };
2350
2628
  }
2351
2629
 
@@ -2402,7 +2680,7 @@ __export2(check_error_exports, {
2402
2680
  compatibleConstructor: () => compatibleConstructor,
2403
2681
  compatibleInstance: () => compatibleInstance,
2404
2682
  compatibleMessage: () => compatibleMessage,
2405
- getConstructorName: () => getConstructorName,
2683
+ getConstructorName: () => getConstructorName2,
2406
2684
  getMessage: () => getMessage
2407
2685
  });
2408
2686
  function isErrorInstance(obj) {
@@ -2436,7 +2714,7 @@ function compatibleMessage(thrown, errMatcher) {
2436
2714
  return false;
2437
2715
  }
2438
2716
  __name(compatibleMessage, "compatibleMessage");
2439
- function getConstructorName(errorLike) {
2717
+ function getConstructorName2(errorLike) {
2440
2718
  let constructorName = errorLike;
2441
2719
  if (isErrorInstance(errorLike)) {
2442
2720
  constructorName = errorLike.constructor.name;
@@ -2449,7 +2727,7 @@ function getConstructorName(errorLike) {
2449
2727
  }
2450
2728
  return constructorName;
2451
2729
  }
2452
- __name(getConstructorName, "getConstructorName");
2730
+ __name(getConstructorName2, "getConstructorName");
2453
2731
  function getMessage(errorLike) {
2454
2732
  let msg = "";
2455
2733
  if (errorLike && errorLike.message) {
@@ -2532,9 +2810,9 @@ function expectTypes(obj, types) {
2532
2810
  return t.toLowerCase();
2533
2811
  });
2534
2812
  types.sort();
2535
- var str = types.map(function(t, index) {
2813
+ var str = types.map(function(t, index2) {
2536
2814
  var art = ~["a", "e", "i", "o", "u"].indexOf(t.charAt(0)) ? "an" : "a";
2537
- var or = types.length > 1 && index === types.length - 1 ? "or " : "";
2815
+ var or = types.length > 1 && index2 === types.length - 1 ? "or " : "";
2538
2816
  return or + art + " " + t;
2539
2817
  }).join(", ");
2540
2818
  var objType = type(obj).toLowerCase();
@@ -3489,9 +3767,9 @@ function iterableEqual(leftHandOperand, rightHandOperand, options) {
3489
3767
  if (length === 0) {
3490
3768
  return true;
3491
3769
  }
3492
- var index = -1;
3493
- while (++index < length) {
3494
- if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) {
3770
+ var index2 = -1;
3771
+ while (++index2 < length) {
3772
+ if (deepEqual(leftHandOperand[index2], rightHandOperand[index2], options) === false) {
3495
3773
  return false;
3496
3774
  }
3497
3775
  }
@@ -3606,8 +3884,8 @@ function hasProperty(obj, name) {
3606
3884
  return name in Object(obj);
3607
3885
  }
3608
3886
  __name(hasProperty, "hasProperty");
3609
- function parsePath(path) {
3610
- const str = path.replace(/([^\\])\[/g, "$1.[");
3887
+ function parsePath(path2) {
3888
+ const str = path2.replace(/([^\\])\[/g, "$1.[");
3611
3889
  const parts = str.match(/(\\\.|[^.]+?)+/g);
3612
3890
  return parts.map((value) => {
3613
3891
  if (value === "constructor" || value === "__proto__" || value === "prototype") {
@@ -3645,8 +3923,8 @@ function internalGetPathValue(obj, parsed, pathDepth) {
3645
3923
  return res;
3646
3924
  }
3647
3925
  __name(internalGetPathValue, "internalGetPathValue");
3648
- function getPathInfo(obj, path) {
3649
- const parsed = parsePath(path);
3926
+ function getPathInfo(obj, path2) {
3927
+ const parsed = parsePath(path2);
3650
3928
  const last = parsed[parsed.length - 1];
3651
3929
  const info = {
3652
3930
  parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj,
@@ -6075,13 +6353,13 @@ var resolve = function(...arguments_) {
6075
6353
  arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
6076
6354
  let resolvedPath = "";
6077
6355
  let resolvedAbsolute = false;
6078
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
6079
- const path = index >= 0 ? arguments_[index] : cwd();
6080
- if (!path || path.length === 0) {
6356
+ for (let index2 = arguments_.length - 1; index2 >= -1 && !resolvedAbsolute; index2--) {
6357
+ const path2 = index2 >= 0 ? arguments_[index2] : cwd();
6358
+ if (!path2 || path2.length === 0) {
6081
6359
  continue;
6082
6360
  }
6083
- resolvedPath = `${path}/${resolvedPath}`;
6084
- resolvedAbsolute = isAbsolute(path);
6361
+ resolvedPath = `${path2}/${resolvedPath}`;
6362
+ resolvedAbsolute = isAbsolute(path2);
6085
6363
  }
6086
6364
  resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
6087
6365
  if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
@@ -6089,22 +6367,22 @@ var resolve = function(...arguments_) {
6089
6367
  }
6090
6368
  return resolvedPath.length > 0 ? resolvedPath : ".";
6091
6369
  };
6092
- function normalizeString(path, allowAboveRoot) {
6370
+ function normalizeString(path2, allowAboveRoot) {
6093
6371
  let res = "";
6094
6372
  let lastSegmentLength = 0;
6095
6373
  let lastSlash = -1;
6096
6374
  let dots = 0;
6097
6375
  let char = null;
6098
- for (let index = 0; index <= path.length; ++index) {
6099
- if (index < path.length) {
6100
- char = path[index];
6376
+ for (let index2 = 0; index2 <= path2.length; ++index2) {
6377
+ if (index2 < path2.length) {
6378
+ char = path2[index2];
6101
6379
  } else if (char === "/") {
6102
6380
  break;
6103
6381
  } else {
6104
6382
  char = "/";
6105
6383
  }
6106
6384
  if (char === "/") {
6107
- if (lastSlash === index - 1 || dots === 1) ;
6385
+ if (lastSlash === index2 - 1 || dots === 1) ;
6108
6386
  else if (dots === 2) {
6109
6387
  if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
6110
6388
  if (res.length > 2) {
@@ -6116,13 +6394,13 @@ function normalizeString(path, allowAboveRoot) {
6116
6394
  res = res.slice(0, lastSlashIndex);
6117
6395
  lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
6118
6396
  }
6119
- lastSlash = index;
6397
+ lastSlash = index2;
6120
6398
  dots = 0;
6121
6399
  continue;
6122
6400
  } else if (res.length > 0) {
6123
6401
  res = "";
6124
6402
  lastSegmentLength = 0;
6125
- lastSlash = index;
6403
+ lastSlash = index2;
6126
6404
  dots = 0;
6127
6405
  continue;
6128
6406
  }
@@ -6133,13 +6411,13 @@ function normalizeString(path, allowAboveRoot) {
6133
6411
  }
6134
6412
  } else {
6135
6413
  if (res.length > 0) {
6136
- res += `/${path.slice(lastSlash + 1, index)}`;
6414
+ res += `/${path2.slice(lastSlash + 1, index2)}`;
6137
6415
  } else {
6138
- res = path.slice(lastSlash + 1, index);
6416
+ res = path2.slice(lastSlash + 1, index2);
6139
6417
  }
6140
- lastSegmentLength = index - lastSlash - 1;
6418
+ lastSegmentLength = index2 - lastSlash - 1;
6141
6419
  }
6142
- lastSlash = index;
6420
+ lastSlash = index2;
6143
6421
  dots = 0;
6144
6422
  } else if (char === "." && dots !== -1) {
6145
6423
  ++dots;
@@ -6149,8 +6427,8 @@ function normalizeString(path, allowAboveRoot) {
6149
6427
  }
6150
6428
  return res;
6151
6429
  }
6152
- var isAbsolute = function(p3) {
6153
- return _IS_ABSOLUTE_RE.test(p3);
6430
+ var isAbsolute = function(p2) {
6431
+ return _IS_ABSOLUTE_RE.test(p2);
6154
6432
  };
6155
6433
  var CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
6156
6434
  var SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
@@ -6239,7 +6517,7 @@ function parseSingleV8Stack(raw) {
6239
6517
  if (file.startsWith("file://")) {
6240
6518
  file = file.slice(7);
6241
6519
  }
6242
- file = resolve(file);
6520
+ file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
6243
6521
  if (method) {
6244
6522
  method = method.replace(/__vite_ssr_import_\d+__\./g, "");
6245
6523
  }
@@ -6281,14 +6559,16 @@ function createChainable(keys, fn) {
6281
6559
 
6282
6560
  // ../../node_modules/@vitest/runner/dist/index.js
6283
6561
  var PendingError = class extends Error {
6284
- constructor(message, task) {
6562
+ constructor(message, task, note) {
6285
6563
  super(message);
6286
6564
  this.message = message;
6565
+ this.note = note;
6287
6566
  this.taskId = task.id;
6288
6567
  }
6289
6568
  code = "VITEST_PENDING";
6290
6569
  taskId;
6291
6570
  };
6571
+ var now$2 = Date.now;
6292
6572
  var collectorContext = {
6293
6573
  tasks: [],
6294
6574
  currentSuite: null
@@ -6309,17 +6589,37 @@ function withTimeout(fn, timeout, isHook = false) {
6309
6589
  }
6310
6590
  const { setTimeout, clearTimeout } = getSafeTimers();
6311
6591
  return function runWithTimeout(...args) {
6312
- return Promise.race([
6313
- fn(...args),
6314
- new Promise((resolve2, reject) => {
6315
- var _a;
6316
- const timer = setTimeout(() => {
6317
- clearTimeout(timer);
6318
- reject(new Error(makeTimeoutMsg(isHook, timeout)));
6319
- }, timeout);
6320
- (_a = timer.unref) == null ? void 0 : _a.call(timer);
6321
- })
6322
- ]);
6592
+ const startTime = now$2();
6593
+ return new Promise((resolve_, reject_) => {
6594
+ var _a;
6595
+ const timer = setTimeout(() => {
6596
+ clearTimeout(timer);
6597
+ reject(new Error(makeTimeoutMsg(isHook, timeout)));
6598
+ }, timeout);
6599
+ (_a = timer.unref) == null ? void 0 : _a.call(timer);
6600
+ function resolve2(result) {
6601
+ clearTimeout(timer);
6602
+ if (now$2() - startTime >= timeout) {
6603
+ reject_(new Error(makeTimeoutMsg(isHook, timeout)));
6604
+ return;
6605
+ }
6606
+ resolve_(result);
6607
+ }
6608
+ function reject(error) {
6609
+ clearTimeout(timer);
6610
+ reject_(error);
6611
+ }
6612
+ try {
6613
+ const result = fn(...args);
6614
+ if (typeof result === "object" && result != null && typeof result.then === "function") {
6615
+ result.then(resolve2, reject);
6616
+ } else {
6617
+ resolve2(result);
6618
+ }
6619
+ } catch (error) {
6620
+ reject(error);
6621
+ }
6622
+ });
6323
6623
  };
6324
6624
  }
6325
6625
  function createTestContext(test4, runner2) {
@@ -6328,17 +6628,22 @@ function createTestContext(test4, runner2) {
6328
6628
  throw new Error("done() callback is deprecated, use promise instead");
6329
6629
  };
6330
6630
  context.task = test4;
6331
- context.skip = () => {
6332
- test4.pending = true;
6333
- throw new PendingError("test is skipped; abort execution", test4);
6631
+ context.skip = (note) => {
6632
+ test4.result ?? (test4.result = { state: "skip" });
6633
+ test4.result.pending = true;
6634
+ throw new PendingError("test is skipped; abort execution", test4, note);
6334
6635
  };
6335
- context.onTestFailed = (fn) => {
6636
+ context.onTestFailed = (handler, timeout) => {
6336
6637
  test4.onFailed || (test4.onFailed = []);
6337
- test4.onFailed.push(fn);
6638
+ test4.onFailed.push(
6639
+ withTimeout(handler, timeout ?? runner2.config.hookTimeout, true)
6640
+ );
6338
6641
  };
6339
- context.onTestFinished = (fn) => {
6642
+ context.onTestFinished = (handler, timeout) => {
6340
6643
  test4.onFinished || (test4.onFinished = []);
6341
- test4.onFinished.push(fn);
6644
+ test4.onFinished.push(
6645
+ withTimeout(handler, timeout ?? runner2.config.hookTimeout, true)
6646
+ );
6342
6647
  };
6343
6648
  return ((_a = runner2.extendTaskContext) == null ? void 0 : _a.call(runner2, context)) || context;
6344
6649
  }
@@ -6364,14 +6669,15 @@ function setHooks(key, hooks) {
6364
6669
  function getHooks(key) {
6365
6670
  return hooksMap.get(key);
6366
6671
  }
6367
- function mergeContextFixtures(fixtures, context = {}) {
6368
- const fixtureOptionKeys = ["auto"];
6672
+ function mergeContextFixtures(fixtures, context, inject) {
6673
+ const fixtureOptionKeys = ["auto", "injected"];
6369
6674
  const fixtureArray = Object.entries(fixtures).map(
6370
6675
  ([prop, value]) => {
6371
6676
  const fixtureItem = { value };
6372
6677
  if (Array.isArray(value) && value.length >= 2 && isObject(value[1]) && Object.keys(value[1]).some((key) => fixtureOptionKeys.includes(key))) {
6373
6678
  Object.assign(fixtureItem, value[1]);
6374
- fixtureItem.value = value[0];
6679
+ const userValue = value[0];
6680
+ fixtureItem.value = fixtureItem.injected ? inject(prop) ?? userValue : userValue;
6375
6681
  }
6376
6682
  fixtureItem.prop = prop;
6377
6683
  fixtureItem.isFn = typeof fixtureItem.value === "function";
@@ -6522,24 +6828,24 @@ function getUsedProps(fn) {
6522
6828
  }
6523
6829
  return props;
6524
6830
  }
6525
- function splitByComma(s) {
6831
+ function splitByComma(s2) {
6526
6832
  const result = [];
6527
6833
  const stack = [];
6528
6834
  let start = 0;
6529
- for (let i = 0; i < s.length; i++) {
6530
- if (s[i] === "{" || s[i] === "[") {
6531
- stack.push(s[i] === "{" ? "}" : "]");
6532
- } else if (s[i] === stack[stack.length - 1]) {
6835
+ for (let i = 0; i < s2.length; i++) {
6836
+ if (s2[i] === "{" || s2[i] === "[") {
6837
+ stack.push(s2[i] === "{" ? "}" : "]");
6838
+ } else if (s2[i] === stack[stack.length - 1]) {
6533
6839
  stack.pop();
6534
- } else if (!stack.length && s[i] === ",") {
6535
- const token = s.substring(start, i).trim();
6840
+ } else if (!stack.length && s2[i] === ",") {
6841
+ const token = s2.substring(start, i).trim();
6536
6842
  if (token) {
6537
6843
  result.push(token);
6538
6844
  }
6539
6845
  start = i + 1;
6540
6846
  }
6541
6847
  }
6542
- const lastToken = s.substring(start).trim();
6848
+ const lastToken = s2.substring(start).trim();
6543
6849
  if (lastToken) {
6544
6850
  result.push(lastToken);
6545
6851
  }
@@ -6603,6 +6909,9 @@ function parseArguments(optionsOrFn, optionsOrTest) {
6603
6909
  "Cannot use two objects as arguments. Please provide options and a function callback in that order."
6604
6910
  );
6605
6911
  }
6912
+ console.warn(
6913
+ "Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration"
6914
+ );
6606
6915
  options = optionsOrTest;
6607
6916
  } else if (typeof optionsOrTest === "number") {
6608
6917
  options = { timeout: optionsOrTest };
@@ -6625,7 +6934,7 @@ function parseArguments(optionsOrFn, optionsOrTest) {
6625
6934
  };
6626
6935
  }
6627
6936
  function createSuiteCollector(name, factory = () => {
6628
- }, mode, shuffle2, each, suiteOptions) {
6937
+ }, mode, each, suiteOptions) {
6629
6938
  const tasks = [];
6630
6939
  const factoryQueue = [];
6631
6940
  let suite2;
@@ -6638,7 +6947,7 @@ function createSuiteCollector(name, factory = () => {
6638
6947
  each: options.each,
6639
6948
  fails: options.fails,
6640
6949
  context: void 0,
6641
- type: "custom",
6950
+ type: "test",
6642
6951
  file: void 0,
6643
6952
  retry: options.retry ?? runner.config.retry,
6644
6953
  repeats: options.repeats,
@@ -6649,9 +6958,7 @@ function createSuiteCollector(name, factory = () => {
6649
6958
  if (options.concurrent || !options.sequential && runner.config.sequence.concurrent) {
6650
6959
  task2.concurrent = true;
6651
6960
  }
6652
- if (shuffle2) {
6653
- task2.shuffle = true;
6654
- }
6961
+ task2.shuffle = suiteOptions == null ? void 0 : suiteOptions.shuffle;
6655
6962
  const context = createTestContext(task2, runner);
6656
6963
  Object.defineProperty(task2, "context", {
6657
6964
  value: context,
@@ -6662,7 +6969,7 @@ function createSuiteCollector(name, factory = () => {
6662
6969
  setFn(
6663
6970
  task2,
6664
6971
  withTimeout(
6665
- withAwaitAsyncAssetions(withFixtures(handler, context), task2),
6972
+ withAwaitAsyncAssertions(withFixtures(handler, context), task2),
6666
6973
  (options == null ? void 0 : options.timeout) ?? runner.config.testTimeout
6667
6974
  )
6668
6975
  );
@@ -6720,7 +7027,7 @@ function createSuiteCollector(name, factory = () => {
6720
7027
  mode,
6721
7028
  each,
6722
7029
  file: void 0,
6723
- shuffle: shuffle2,
7030
+ shuffle: suiteOptions == null ? void 0 : suiteOptions.shuffle,
6724
7031
  tasks: [],
6725
7032
  meta: /* @__PURE__ */ Object.create(null),
6726
7033
  concurrent: suiteOptions == null ? void 0 : suiteOptions.concurrent
@@ -6765,9 +7072,9 @@ function createSuiteCollector(name, factory = () => {
6765
7072
  collectTask(collector);
6766
7073
  return collector;
6767
7074
  }
6768
- function withAwaitAsyncAssetions(fn, task) {
7075
+ function withAwaitAsyncAssertions(fn, task) {
6769
7076
  return async (...args) => {
6770
- await fn(...args);
7077
+ const fnResult = await fn(...args);
6771
7078
  if (task.promises) {
6772
7079
  const result = await Promise.allSettled(task.promises);
6773
7080
  const errors = result.map((r2) => r2.status === "rejected" ? r2.reason : void 0).filter(Boolean);
@@ -6775,10 +7082,12 @@ function withAwaitAsyncAssetions(fn, task) {
6775
7082
  throw errors;
6776
7083
  }
6777
7084
  }
7085
+ return fnResult;
6778
7086
  };
6779
7087
  }
6780
7088
  function createSuite() {
6781
- function suiteFn(name, factoryOrOptions, optionsOrFactory = {}) {
7089
+ function suiteFn(name, factoryOrOptions, optionsOrFactory) {
7090
+ var _a;
6782
7091
  const mode = this.only ? "only" : this.skip ? "skip" : this.todo ? "todo" : "run";
6783
7092
  const currentSuite = collectorContext.currentSuite || defaultSuite;
6784
7093
  let { options, handler: factory } = parseArguments(
@@ -6787,9 +7096,11 @@ function createSuite() {
6787
7096
  );
6788
7097
  const isConcurrentSpecified = options.concurrent || this.concurrent || options.sequential === false;
6789
7098
  const isSequentialSpecified = options.sequential || this.sequential || options.concurrent === false;
6790
- if (currentSuite == null ? void 0 : currentSuite.options) {
6791
- options = { ...currentSuite.options, ...options };
6792
- }
7099
+ options = {
7100
+ ...currentSuite == null ? void 0 : currentSuite.options,
7101
+ ...options,
7102
+ shuffle: this.shuffle ?? options.shuffle ?? ((_a = currentSuite == null ? void 0 : currentSuite.options) == null ? void 0 : _a.shuffle) ?? (runner == null ? void 0 : runner.config.sequence.shuffle)
7103
+ };
6793
7104
  const isConcurrent = isConcurrentSpecified || options.concurrent && !isSequentialSpecified;
6794
7105
  const isSequential = isSequentialSpecified || options.sequential && !isConcurrentSpecified;
6795
7106
  options.concurrent = isConcurrent && !isSequential;
@@ -6798,7 +7109,6 @@ function createSuite() {
6798
7109
  formatName(name),
6799
7110
  factory,
6800
7111
  mode,
6801
- this.shuffle,
6802
7112
  this.each,
6803
7113
  options
6804
7114
  );
@@ -6813,7 +7123,7 @@ function createSuite() {
6813
7123
  const _name = formatName(name);
6814
7124
  const arrayOnlyCases = cases.every(Array.isArray);
6815
7125
  const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);
6816
- const fnFirst = typeof optionsOrFn === "function";
7126
+ const fnFirst = typeof optionsOrFn === "function" && typeof fnOrOptions === "object";
6817
7127
  cases.forEach((i, idx) => {
6818
7128
  const items = Array.isArray(i) ? i : [i];
6819
7129
  if (fnFirst) {
@@ -6837,6 +7147,18 @@ function createSuite() {
6837
7147
  this.setContext("each", void 0);
6838
7148
  };
6839
7149
  };
7150
+ suiteFn.for = function(cases, ...args) {
7151
+ if (Array.isArray(cases) && args.length) {
7152
+ cases = formatTemplateString(cases, args);
7153
+ }
7154
+ return (name, optionsOrFn, fnOrOptions) => {
7155
+ const name_ = formatName(name);
7156
+ const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);
7157
+ cases.forEach((item, idx) => {
7158
+ suite(formatTitle(name_, toArray(item), idx), options, () => handler(item));
7159
+ });
7160
+ };
7161
+ };
6840
7162
  suiteFn.skipIf = (condition) => condition ? suite.skip : suite;
6841
7163
  suiteFn.runIf = (condition) => condition ? suite : suite.skip;
6842
7164
  return createChainable(
@@ -6856,7 +7178,7 @@ function createTaskCollector(fn, context) {
6856
7178
  const _name = formatName(name);
6857
7179
  const arrayOnlyCases = cases.every(Array.isArray);
6858
7180
  const { options, handler } = parseArguments(optionsOrFn, fnOrOptions);
6859
- const fnFirst = typeof optionsOrFn === "function";
7181
+ const fnFirst = typeof optionsOrFn === "function" && typeof fnOrOptions === "object";
6860
7182
  cases.forEach((i, idx) => {
6861
7183
  const items = Array.isArray(i) ? i : [i];
6862
7184
  if (fnFirst) {
@@ -6903,7 +7225,14 @@ function createTaskCollector(fn, context) {
6903
7225
  return condition ? this : this.skip;
6904
7226
  };
6905
7227
  taskFn.extend = function(fixtures) {
6906
- const _context = mergeContextFixtures(fixtures, context);
7228
+ const _context = mergeContextFixtures(
7229
+ fixtures,
7230
+ context || {},
7231
+ (key) => {
7232
+ var _a, _b;
7233
+ return (_b = (_a = getRunner()).injectValue) == null ? void 0 : _b.call(_a, key);
7234
+ }
7235
+ );
6907
7236
  return createTest(function fn2(name, optionsOrFn, optionsOrTest) {
6908
7237
  getCurrentSuite().test.fn.call(
6909
7238
  this,
@@ -7031,13 +7360,14 @@ var import_expect_type = __toESM(require_dist(), 1);
7031
7360
  // lib/statics/generators.ts
7032
7361
  var fs = __toESM(require("node:fs"), 1);
7033
7362
  var import_promises = __toESM(require("node:fs/promises"), 1);
7363
+ var path = __toESM(require("node:path"), 1);
7034
7364
  function* positiveTest(type3) {
7035
- const dir = `${__dirname}/${type3}`;
7365
+ const dir = path.join(__dirname, type3);
7036
7366
  const statics = fs.readdirSync(dir);
7037
7367
  for (const file of statics) {
7038
7368
  if (file.endsWith(".sparql")) {
7039
7369
  yield {
7040
- name: file.replace(/\.sparql$/, ""),
7370
+ name: file.replace(/\.sparql$/u, ""),
7041
7371
  statics: async () => {
7042
7372
  const query = await import_promises.default.readFile(`${dir}/${file}`, "utf-8");
7043
7373
  const result = await import_promises.default.readFile(`${dir}/${file.replace(".sparql", ".json")}`, "utf-8");
@@ -7052,12 +7382,12 @@ function* positiveTest(type3) {
7052
7382
  }
7053
7383
  }
7054
7384
  function* negativeTest(type3) {
7055
- const dir = `${__dirname}/${type3}`;
7385
+ const dir = path.join(__dirname, type3);
7056
7386
  const statics = fs.readdirSync(dir);
7057
7387
  for (const file of statics) {
7058
7388
  if (file.endsWith(".sparql")) {
7059
7389
  yield {
7060
- name: file.replace(/\.sparql$/, ""),
7390
+ name: file.replace(/\.sparql$/u, ""),
7061
7391
  statics: async () => {
7062
7392
  const query = await import_promises.default.readFile(`${dir}/${file}`, "utf-8");
7063
7393
  return {
@@ -7071,7 +7401,7 @@ function* negativeTest(type3) {
7071
7401
 
7072
7402
  // lib/Sparql11NotesTest.ts
7073
7403
  function importSparql11NoteTests(parser, dataFactory) {
7074
- function testErroneousQuery(query, errorMsg) {
7404
+ function testErroneousQuery(query, _errorMsg) {
7075
7405
  return ({ expect: expect2 }) => {
7076
7406
  let error = null;
7077
7407
  try {
@@ -7368,15 +7698,41 @@ DATA { GRAPH <ex:G> { <ex:s> <ex:p> 'o1', 'o2', 'o3' } }`;
7368
7698
  }
7369
7699
  );
7370
7700
  }
7701
+
7702
+ // lib/fileUtils.ts
7703
+ var import_promises2 = __toESM(require("node:fs/promises"), 1);
7704
+ async function readFile(path2, encoding) {
7705
+ const content = await import_promises2.default.readFile(path2, encoding);
7706
+ return content.replaceAll(/\r?\n/gu, "\n");
7707
+ }
7371
7708
  // Annotate the CommonJS export names for ESM import in node:
7372
7709
  0 && (module.exports = {
7373
7710
  importSparql11NoteTests,
7374
7711
  negativeTest,
7375
- positiveTest
7712
+ positiveTest,
7713
+ readFile
7376
7714
  });
7377
7715
  /*! Bundled license information:
7378
7716
 
7379
7717
  @vitest/pretty-format/dist/index.js:
7718
+ (**
7719
+ * @license React
7720
+ * react-is.production.js
7721
+ *
7722
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7723
+ *
7724
+ * This source code is licensed under the MIT license found in the
7725
+ * LICENSE file in the root directory of this source tree.
7726
+ *)
7727
+ (**
7728
+ * @license React
7729
+ * react-is.development.js
7730
+ *
7731
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7732
+ *
7733
+ * This source code is licensed under the MIT license found in the
7734
+ * LICENSE file in the root directory of this source tree.
7735
+ *)
7380
7736
  (**
7381
7737
  * @license React
7382
7738
  * react-is.production.min.js