mradionov / tleaf

AngularJS unit test generator

Home Page:https://www.npmjs.com/package/tleaf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find any units.

JituG22 opened this issue · comments

commented

I was installed and when I hit the "tleaf app.js app.spec.js" its return me error [tleaf]: Could not find any units
error

Hey, could you please share the code from the app.js? I can only help you if I have the code to reproduce the issue.

commented

var app = angular("myModule").controller('mainController', function($scope, mySer) {
$scope.title1 = "Hello mainController";
$scope.datavalues = "Home page data";
$scope.result = true;
$scope.serviceMsg = mySer.serviceMsg;
$scope.myFun = function(){
if($scope.result === true){
return true
}
return false
}

});

Hey, could you please share the code from the app.js? I can only help you if I have the code to reproduce the issue.

The issue is with the part

angular("myModule")

My tool does not recognize it as a module definition. It only knows how to parse something like this:

angular.module("myModule")

To be honest I haven't worked with Angular for a long time now, but I don't remember modules being defined via angular('myModule'). Is it a new syntax?
If I change it to angular.module("myModule") the tool works as expected.