@singingwolfboy Your comment:

----------------
Wait, you're setting `window.YT.Player`, and then you're spying on it? Why? If you need a spy, why not set one when you create the `window.YT` object? Why do you even need to create the `window.YT` object at all?
----------------

This was necessary, because for some reason window.YT was undefined when Jasmine reached this test. I have decided to look for why this is happening, and found the culprit in `common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js`. I have removed the line that makes `window.YT.Player` undefined, and discovered that this actually fixes the problem, and does not break anything. Must have been a left-over piece of code.