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

Add test to add documentation

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2022-06-21 18:08:25 +03:00
parent 5762b1963b
commit d7f60a712f

View File

@ -91,7 +91,7 @@ describe("technical: resolve-proxy-from-electron", () => {
}); });
describe("given there are only destroyed Lens windows, when called with URL", () => { describe("given there are only destroyed Lens windows, when called with URL", () => {
let error: unknown; let error: any;
beforeEach(async () => { beforeEach(async () => {
di.override( di.override(
@ -127,6 +127,10 @@ describe("technical: resolve-proxy-from-electron", () => {
} }
}); });
it("throws error", () => {
expect(error.message).toBe('Tried to resolve proxy for "some-url", but no browser window was available');
});
it("logs error", () => { it("logs error", () => {
expect(logErrorMock).toHaveBeenCalledWith("Error resolving proxy", error); expect(logErrorMock).toHaveBeenCalledWith("Error resolving proxy", error);
}); });