mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 10:39:57 +00:00
Add chrome.cast.media class tests
This commit is contained in:
20
test/spec/shim/media/VolumeRequest.spec.js
Normal file
20
test/spec/shim/media/VolumeRequest.spec.js
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
describe("chrome.cast.media.VolumeRequest", () => {
|
||||
it("should have all properties", async () => {
|
||||
const volumeRequest = new chrome.cast.media.VolumeRequest();
|
||||
|
||||
expect(volumeRequest.customData).toBe(null);
|
||||
expect(volumeRequest.volume).toBe(undefined);
|
||||
});
|
||||
|
||||
it("should have expected assigned properties", async () => {
|
||||
const volume = new chrome.cast.Volume(0.5, false);
|
||||
const volumeRequest = new chrome.cast.media.VolumeRequest(volume);
|
||||
|
||||
expect(volumeRequest.volume).toEqual(jasmine.objectContaining({
|
||||
level: 0.5
|
||||
, muted: false
|
||||
}));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user