I did that here: https://jsfiddle.net/Lqe5youb/2/
it("is called with the video element", function() {
//given
const video = document.createElement("video");
//when
videoPlayer.addPlayer(video);
//then
expect(player.m).toBe(video);
});
});
});
Is this then changed to video where we have the test pass?
player = new YT.Player(null, config);
passes: player = new YT.Player(video, config);