parse.com - Unit test says function was called, but console.logs are not showing up -
i have function inside function supposedly getting called, according expect(parse.user.login).tohavebeencalled()
line, there console statements inside callback aren't showing up.
is there type of dependency i'm missing on unit test causing callback not have called? think getting server, because tells me need parse.initialize
application keys if that's not present.
how resolve it?
it occurred me, maybe that's in parse.js telling me need parse.initialize(keys,keys). changed parse keys nonsense, , not telling me they're wrong, must parse isn't being touched @ all. no request being sent server.
i've been putting few questions this, guess can't done karma-jasmine -- @ least way app set right now. it's depending on web service give errors, instead of having angular directive set up front detect errors in fields beforehand.
i'm newbie @ obviously, or have recognized sooner:
this type of testing, depending on responses server , that's that, should delegated e2e tests.
meaning, here supposed test wouldn't hardcoding desired response right jasmine spy? set rootscope user attribute? maybe, if state.go
changed view page, , acted on $rootscope
data, make sense. now, there's no point. i'm not designing next step, nor know @ moment, can sit back.
Comments
Post a Comment