You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-31 15:24:23 +03:00
More tests to satisfy sonarcloud
This commit is contained in:
@ -140,6 +140,15 @@ describe("parseErrorResponse", () => {
|
|||||||
}, 500, "https://example.com"));
|
}, 500, "https://example.com"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should set a sensible default error message on MatrixError", () => {
|
||||||
|
let err = new MatrixError();
|
||||||
|
expect(err.message).toEqual("MatrixError: Unknown message");
|
||||||
|
err = new MatrixError({
|
||||||
|
error: "Oh no",
|
||||||
|
});
|
||||||
|
expect(err.message).toEqual("MatrixError: Oh no");
|
||||||
|
});
|
||||||
|
|
||||||
it("should handle no type gracefully", () => {
|
it("should handle no type gracefully", () => {
|
||||||
expect(parseErrorResponse({
|
expect(parseErrorResponse({
|
||||||
headers: {
|
headers: {
|
||||||
|
Reference in New Issue
Block a user