Is this javascript code unit testable using Jasmine. If not how do we make it unit testable?
The problem basically is the helloworld function is not accessible inside a test spec js file, since it is not in global scope. How do we refactor the code such that it is accessible within the test spec file?
(function($){
function helloWorld() {
return "Hello world!";
}
})(jQuery);
Aucun commentaire:
Enregistrer un commentaire