mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 09:15:41 +03:00
Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
837e27ed42
commit
9d68f2c4cc
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ describe("<Map />", () => {
|
||||||
const logSpy = jest.spyOn(logger, "error").mockImplementation();
|
const logSpy = jest.spyOn(logger, "error").mockImplementation();
|
||||||
getComponent({ centerGeoUri: "123 Sesame Street" });
|
getComponent({ centerGeoUri: "123 Sesame Street" });
|
||||||
expect(mockMap.setCenter).not.toHaveBeenCalled();
|
expect(mockMap.setCenter).not.toHaveBeenCalled();
|
||||||
expect(logSpy).toHaveBeenCalledWith("Could not set map center");
|
expect(logSpy).toHaveBeenCalledWith("Could not set map center", expect.any(Error));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("updates map center when centerGeoUri prop changes", () => {
|
it("updates map center when centerGeoUri prop changes", () => {
|
||||||
|
@ -136,7 +136,7 @@ describe("<Map />", () => {
|
||||||
const bounds = { north: "a", south: "b", east: 42, west: 41 };
|
const bounds = { north: "a", south: "b", east: 42, west: 41 };
|
||||||
getComponent({ bounds });
|
getComponent({ bounds });
|
||||||
expect(mockMap.fitBounds).not.toHaveBeenCalled();
|
expect(mockMap.fitBounds).not.toHaveBeenCalled();
|
||||||
expect(logSpy).toHaveBeenCalledWith("Invalid map bounds");
|
expect(logSpy).toHaveBeenCalledWith("Invalid map bounds", expect.any(Error));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("updates map bounds when bounds prop changes", () => {
|
it("updates map bounds when bounds prop changes", () => {
|
||||||
|
|
Loading…
Reference in a new issue