Files
trailbase/trailbase-core/js/admin/tests/util.test.ts

16 lines
341 B
TypeScript

import { expect, test } from "vitest"
import { copyAndConvertRow } from "@/lib/convert";
type UnknownRow = { [key: string]: unknown };
test("utils", () => {
const x: UnknownRow = {
"foo": "test",
"bar": "test",
};
const y = copyAndConvertRow(x);
for (const key of Object.keys(x)) {
expect(x[key]).toBe(y[key]);
}
});