mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 17:00:54 +01:00
* feat: update prettier configuration for print width * chore: apply code formatting to entire repository * fix: remove build files * fix: format issue --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
22 lines
710 B
TypeScript
22 lines
710 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { objectEntries, objectKeys } from "../object";
|
|
|
|
const testObjects = [{ a: 1, c: 3, b: 2 }, { a: 1, b: 2 }, { a: 1 }, {}] as const;
|
|
|
|
describe("objectKeys should return all keys of an object", () => {
|
|
testObjects.forEach((obj) => {
|
|
it(`should return all keys of the object ${JSON.stringify(obj)}`, () => {
|
|
expect(objectKeys(obj)).toEqual(Object.keys(obj));
|
|
});
|
|
});
|
|
});
|
|
|
|
describe("objectEntries should return all entries of an object", () => {
|
|
testObjects.forEach((obj) => {
|
|
it(`should return all entries of the object ${JSON.stringify(obj)}`, () => {
|
|
expect(objectEntries(obj)).toEqual(Object.entries(obj));
|
|
});
|
|
});
|
|
});
|