angularjs - Access a collection from html in karma unit test -


i have quick question. i'm sorry, i'm c++ developer , manager having me fill in on angular team temporarily, though have no previous experience in it.

i'm writing karma tests , in html i'm testing have like:

ng-repeat phone in phonelist

the controller modifies phonelist. controller called ctlr. (not sure if matters).

i need know how put element phonelist within karma test. i've tried like:

var phonelist = dom.find("#phonelist");

phonelist.push(someobjectivecreated);

expect(dom.find("#phonelist).length).tobe(1);

length still 0. know i'm doing isn't right anyway because have no idea i'm doing. if can figure part out have other karma test examples sort of copy need. hate karma tests.

what doing wrong? hope enough information. thanks!


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - SSE Emitter : Manage timeouts and complete() -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -