CEC-3149: Archive Manifest option (#241)
Co-authored-by: Alexander Andrews <aandrews@fiskerinc.com>
This commit is contained in:
committed by
GitHub
parent
eb82c178ca
commit
8e33ca6b7d
@@ -105,6 +105,8 @@ const validateManifestUpdate = (data) => {
|
||||
if (data.type == null || !["forced", "standard"].includes(data.type)) {
|
||||
throw new Error("Invalid manifest type");
|
||||
}
|
||||
|
||||
if (data.active == null || typeof data.active !== "boolean") throw new Error("Invalid active boolean")
|
||||
}
|
||||
|
||||
export const useManifestsContext = () => useContext(ManifestsContext);
|
||||
|
||||
@@ -51,6 +51,7 @@ describe("ManifestContext", () => {
|
||||
update({
|
||||
name: "new package",
|
||||
type: "forced",
|
||||
active: true,
|
||||
})
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -52,6 +52,7 @@ let manifest = {
|
||||
],
|
||||
created: "2021-12-09T22:38:11.679943Z",
|
||||
updated: "2022-01-14T00:47:08.996451Z",
|
||||
active: true,
|
||||
};
|
||||
let manifests = [
|
||||
{
|
||||
@@ -60,6 +61,7 @@ let manifests = [
|
||||
version: "1.0",
|
||||
created: "2021-07-01T22:40:07.778509Z",
|
||||
updated: "2021-07-12T18:22:13.736755Z",
|
||||
active: true,
|
||||
},
|
||||
];
|
||||
let totalManifests = 1;
|
||||
|
||||
Reference in New Issue
Block a user