You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-30 04:23:07 +03:00
More tests to satisfy sonarcloud
This commit is contained in:
@ -140,6 +140,15 @@ describe("parseErrorResponse", () => {
|
||||
}, 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", () => {
|
||||
expect(parseErrorResponse({
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user