![](https://secure.gravatar.com/avatar/6d4b208a53ff584c7e93f187ef6400eb?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
karma test cases
Im trying to write a karma test case for the following code which im using it in my controller im my project.
playerInstance = jwplayer("myElement")
playerInstance.setup({
primary: playerPrimary,
file: videoURL,
image: videoImage,
title:title,
description:description,
tracks: [{
file:restEndPoint+caption,
label: "English",
kind: "captions",
"default": true
}],
width: '100%',
aspectratio:"16:9",
preload:"none"
});
but it fails :TypeError: 'undefined' is not a function (evaluating 'playerInstance.setup')
when i did console.log(playerInstance), it has only one function registerPlugin().it does not have other api's.
Can someone post examples of karma test cases and can you provide me solution for that.