feature/IO-2769-Job-Totals-Testing - cleanup

This commit is contained in:
Dave Richer
2025-04-08 17:04:50 -04:00
parent c169bb5d5d
commit e33ff2a45d

View File

@@ -2,7 +2,8 @@ import fs from "fs";
import path from "path"; import path from "path";
import { describe, it, expect } from "vitest"; import { describe, it, expect } from "vitest";
import { TotalsServerSide as TotalsServerSideCA } from "../job-totals"; // Canadian version (imex) import { TotalsServerSide as TotalsServerSideCA } from "../job-totals"; // Canadian version (imex)
import { TotalsServerSide as TotalsServerSideUS } from "../job-totals-USA"; // US version (rome) import { TotalsServerSide as TotalsServerSideUS } from "../job-totals-USA";
import { isFunction } from "lodash"; // US version (rome)
/** /**
* This function is used to replace the values in the object with their toObject() representation. * This function is used to replace the values in the object with their toObject() representation.
@@ -11,7 +12,7 @@ import { TotalsServerSide as TotalsServerSideUS } from "../job-totals-USA"; // U
* @returns {*} * @returns {*}
*/ */
const dineroReplacer = (key, value) => { const dineroReplacer = (key, value) => {
if (value && typeof value === "object" && typeof value.toObject === "function") { if (isFunction(value)) {
return value.toObject(); return value.toObject();
} }
return value; return value;