mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
24 lines
755 B
JavaScript
24 lines
755 B
JavaScript
"use strict";
|
|
|
|
describe("chrome.cast.Error", () => {
|
|
it("should have all properties", async () => {
|
|
const error = new chrome.cast.Error();
|
|
|
|
expect(typeof error.code).toBe("undefined");
|
|
expect(error.description).toBe(null);
|
|
expect(error.details).toBe(null);
|
|
});
|
|
|
|
it("should have expected assigned properties", async () => {
|
|
const error = new chrome.cast.Error(
|
|
chrome.cast.ErrorCode.CANCEL,
|
|
"testErrorDescription",
|
|
{ testErrorDetails: "testErrorDetails" }
|
|
);
|
|
|
|
expect(error.code).toBe("cancel");
|
|
expect(error.description).toBe("testErrorDescription");
|
|
expect(error.details).toEqual({ testErrorDetails: "testErrorDetails" });
|
|
});
|
|
});
|