1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix tests by matching equality instead of snapshots

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-03-27 12:08:37 -04:00
parent b18efcc85c
commit 81b2179588

View File

@ -113,38 +113,38 @@ describe("ExtensionLoader", () => {
}); });
it("renderer updates extension after ipc broadcast", async () => { it("renderer updates extension after ipc broadcast", async () => {
expect(extensionLoader.userExtensions).toMatchInlineSnapshot(`Map {}`); expect(extensionLoader.userExtensions).toEqual(new Map());
await extensionLoader.init(); await extensionLoader.init();
await delay(10); await delay(10);
// Assert the extensions after the extension broadcast event // Assert the extensions after the extension broadcast event
expect(extensionLoader.userExtensions).toMatchInlineSnapshot(` expect(extensionLoader.userExtensions).toEqual(
Map { new Map([
"manifest/path" => Object { ["manifest/path", {
"absolutePath": "/test/1", absolutePath: "/test/1",
"id": "manifest/path", id: "manifest/path",
"isBundled": false, isBundled: false,
"isEnabled": true, isEnabled: true,
"manifest": Object { manifest: {
"name": "TestExtension", name: "TestExtension",
"version": "1.0.0", version: "1.0.0",
}, },
"manifestPath": "manifest/path", manifestPath: "manifest/path",
}, }],
"manifest/path3" => Object { ["manifest/path3", {
"absolutePath": "/test/3", absolutePath: "/test/3",
"id": "manifest/path3", id: "manifest/path3",
"isBundled": false, isBundled: false,
"isEnabled": true, isEnabled: true,
"manifest": Object { manifest: {
"name": "TestExtension3", name: "TestExtension3",
"version": "3.0.0", version: "3.0.0",
}, },
"manifestPath": "manifest/path3", manifestPath: "manifest/path3",
}, }],
} ]),
`); );
}); });
it("updates ExtensionsStore after isEnabled is changed", async () => { it("updates ExtensionsStore after isEnabled is changed", async () => {