/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import Chai from "chai";
import "./global-definitions.js";
Chai.config.truncateThreshold = 200;
function createDiffMarker(title) {
  return {
    toString() {
      return `<<${title}>>`;
    }
  };
}
expect.IGNORE = createDiffMarker("ignore");
expect.BIGINT = createDiffMarker("bigint");
expect.BYTES = createDiffMarker("bytes");
expect.NUMBER = createDiffMarker("number");
expect.STRING = createDiffMarker("string");
Chai.config.deepEqual = (expected, actual) => {
  return Chai.util.eql(expected, actual, {
    comparator(expected2, actual2) {
      switch (expected2) {
        case expect.IGNORE:
          return true;
        case expect.BIGINT:
          return typeof actual2 === "bigint";
        case expect.NUMBER:
          return typeof actual2 === "number";
        case expect.STRING:
          return typeof actual2 === "string";
        case expect.BYTES:
          return actual2 instanceof Uint8Array;
      }
      if (typeof actual2 === "object" && actual2?.constructor.name === "Interval" && "ms" in actual2) {
        if (typeof expected2 === "number") {
          return actual2.ms === expected2;
        }
        if (typeof expected2 === "object" && expected2 !== null && "ms" in expected2) {
          return actual2.ms === expected2.ms;
        }
      }
      return null;
    }
  });
};
//# sourceMappingURL=chai.js.map
