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:
parent
b18efcc85c
commit
81b2179588
@ -113,38 +113,38 @@ describe("ExtensionLoader", () => {
|
||||
});
|
||||
|
||||
it("renderer updates extension after ipc broadcast", async () => {
|
||||
expect(extensionLoader.userExtensions).toMatchInlineSnapshot(`Map {}`);
|
||||
expect(extensionLoader.userExtensions).toEqual(new Map());
|
||||
|
||||
await extensionLoader.init();
|
||||
await delay(10);
|
||||
|
||||
// Assert the extensions after the extension broadcast event
|
||||
expect(extensionLoader.userExtensions).toMatchInlineSnapshot(`
|
||||
Map {
|
||||
"manifest/path" => Object {
|
||||
"absolutePath": "/test/1",
|
||||
"id": "manifest/path",
|
||||
"isBundled": false,
|
||||
"isEnabled": true,
|
||||
"manifest": Object {
|
||||
"name": "TestExtension",
|
||||
"version": "1.0.0",
|
||||
expect(extensionLoader.userExtensions).toEqual(
|
||||
new Map([
|
||||
["manifest/path", {
|
||||
absolutePath: "/test/1",
|
||||
id: "manifest/path",
|
||||
isBundled: false,
|
||||
isEnabled: true,
|
||||
manifest: {
|
||||
name: "TestExtension",
|
||||
version: "1.0.0",
|
||||
},
|
||||
"manifestPath": "manifest/path",
|
||||
},
|
||||
"manifest/path3" => Object {
|
||||
"absolutePath": "/test/3",
|
||||
"id": "manifest/path3",
|
||||
"isBundled": false,
|
||||
"isEnabled": true,
|
||||
"manifest": Object {
|
||||
"name": "TestExtension3",
|
||||
"version": "3.0.0",
|
||||
manifestPath: "manifest/path",
|
||||
}],
|
||||
["manifest/path3", {
|
||||
absolutePath: "/test/3",
|
||||
id: "manifest/path3",
|
||||
isBundled: false,
|
||||
isEnabled: true,
|
||||
manifest: {
|
||||
name: "TestExtension3",
|
||||
version: "3.0.0",
|
||||
},
|
||||
"manifestPath": "manifest/path3",
|
||||
},
|
||||
}
|
||||
`);
|
||||
manifestPath: "manifest/path3",
|
||||
}],
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
it("updates ExtensionsStore after isEnabled is changed", async () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user