Moved from testing src, to testing compiled (dist) app

5 views
Skip to first unread message

michael...@radius.com

unread,
Jan 27, 2016, 3:27:04 PM1/27/16
to karma-users
Hi there,

I've been experimenting with running unit tests on our angular 1.4 app post-build using the requirejs' compiler. wanted to get the communities opinion on this fundamental matter. Yes I've gotten it to "work". I recognize that I'm sending this angular/karma topic to the karma group btw, but let me know if there's a better forum!

Anyway, here's what I find interesting and wanted to get the communities opinion.  All documentation w angular/karma I've seen assume testing raw code, whereas most prod apps use a build chain. 

So.. 

Why do testing tools not seem to support testing compiled assets? Karma serves app through a web-server mapped to /base, my app is served via /xyz on a CDN.

Why is using ng mocks.module any better in theory than angular.module and just mocking things as needed? ps. I like httpBackend

Why, when I talk to front-end developers, do they have no idea how to debug unit tests? And why does it suck if you do? (Java is nice, lets be like that.)

Why is the developer experience with unit tests often include the following statement "Hey look at this insane stack trace, WTF"

Anyway I will keep this short. What I primarily and looking for is whether there are people contemplating the topic of testing SPA apps post-build for the future.

Cheers,
Michael


aper...@gmail.com

unread,
Jul 19, 2016, 1:31:10 AM7/19/16
to karma-users
Sweet
Reply all
Reply to author
Forward
0 new messages