mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
41 lines
937 B
JavaScript
41 lines
937 B
JavaScript
"use strict";
|
|
|
|
const { create } = require("../../../driver");
|
|
|
|
describe("chrome.cast.Image", () => {
|
|
let driver;
|
|
|
|
beforeAll(async () => {
|
|
driver = await create();
|
|
});
|
|
afterAll(() => {
|
|
driver.quit();
|
|
})
|
|
|
|
|
|
it("should have all properties", async () => {
|
|
const [ typeof_url
|
|
, image ] = await driver.executeScript(() => {
|
|
|
|
const image = new chrome.cast.Image();
|
|
|
|
return [
|
|
typeof image.url
|
|
, image
|
|
];
|
|
});
|
|
|
|
expect(typeof_url).toBe("undefined");
|
|
expect(image.height).toBe(null);
|
|
expect(image.width).toBe(null);
|
|
});
|
|
|
|
it("should have expected assigned properties", async () => {
|
|
const image = await driver.executeScript(() => {
|
|
return new chrome.cast.Image("http://example.com");
|
|
});
|
|
|
|
expect(image.url).toBe("http://example.com");
|
|
});
|
|
});
|