Using ngMockE2E to mock backend data

Share this video with your friends

Send Tweet

Mocking backend responses is extremely simple with angular-mocks.js and the ngMockE2E module. This lesson will show you how to include and use the module, ensuring you can stay productive on the front end even if your back end is broken, slow, or doesn't even exist yet.

Free Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.

Joseph
Joseph
~ 5 years ago

Do you know how to mock in Protractor without needing to modify the app's source?

Ben Clinkinbeard
Ben Clinkinbeard(instructor)
~ 5 years ago

Hey Joseph,

I guess you could check the URL and/or port the app is running on, and conditionally define the mocks if it matches your test environment.

HTH, Ben

Victor Hazbun
Victor Hazbun
~ 5 years ago

Why you don't create a video of how to use protractor and ngMockE2E?