How to use the angular-mocks.default function in angular-mocks

To help you get started, we’ve selected a few angular-mocks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zewa666 / angular_es6 / src / components / main / flickr-service-spec.js View on Github external
describe('FlickrService', () => {

  var service, $httpBackend;
  beforeEach(() => { angular.mock.module(appName); });

  beforeEach(mocks.default.inject((_$httpBackend_, _FlickrService_) => {
    service = _FlickrService_;
    $httpBackend = _$httpBackend_;

    $httpBackend.whenJSONP(/http:\/\/api.flickr.com/)
                .respond({
      "title": "Fake response",
      "link": "http://fakelink.com",
      "description": "",
      "modified": "1970-01-01T01:01:01Z",
      "generator": "FakeGenerator",
      "items": [
       {
        "title": "TEST",
        "link": "http://FakeImageLing",
        "media": {"m":"http://fakeImage.jpg"},
        "date_taken": "1970-01-01T12:05:34-08:00",

angular-mocks

AngularJS mocks for testing

MIT
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis