Within the Angular component I am testing, there is an async promise that I am struggling to examine. The code inside the 'then' block is crucial for my testing purposes, but I cannot seem to access it.
angular.module('Ls', [
])
function Locale($rootScope, $http) {
var API = {
getAvailables: getAvailables
};
API.getAvailables().then(function(data) {
..........perform certain actions
........I am particularly interested in testing this specific code segment!!!
});
function getAvailables() {
return $http.get('/l.json').then(function(response) {
return response.data;
});
}