See here for example: http://www.johnpapa.net/angularjss-controller-as-and-the-vm-variable/
As the title suggests, I\'m following along on this tutorial [http://tech
Ah, obvious now...I can access the vm variable through making a reference to the controller that's created in the test:
it("should assign Dashboard as title", function () {
var vm = controller("dashboard", { $scope: scope });
expect(vm.title).toBe("Dashboard");
});
you can also do this:
it("should assign Dashboard as title", function () {
var controller = controller("dashboard as vm", { $scope: scope });
expect(scope.vm.title).toBe("Dashboard");
});