-
Notifications
You must be signed in to change notification settings - Fork 567
Expand file tree
/
Copy pathpackage.test.ts
More file actions
26 lines (24 loc) · 864 Bytes
/
package.test.ts
File metadata and controls
26 lines (24 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import backend from "@home-assistant-matter-hub/backend/package.json" with {
type: "json",
};
import common from "@home-assistant-matter-hub/common/package.json" with {
type: "json",
};
import { mapValues, pickBy } from "lodash-es";
import { describe, expect, it } from "vitest";
import own from "../package.json" with { type: "json" };
describe("home-assistant-matter-hub", () => {
it("should include all necessary dependencies", () => {
const expected = pickBy(
{ ...backend.dependencies, ...common.dependencies },
(_, key) => !key.startsWith("@home-assistant-matter-hub/"),
);
expect(own.dependencies).toEqual(expected);
});
it("should pin all dependencies", () => {
const expected = mapValues(own.dependencies, (value) =>
value.replace(/^\D+/, ""),
);
expect(own.dependencies).toEqual(expected);
});
});