dustinspecker/generator-ng-poly

View on GitHub
lib/service/templates/_spec.es6

Summary

Maintainability
Test Coverage
/* global describe, beforeEach, it, expect, inject, module */
'use strict';

describe('<%= upperCamel %>', () => {
  let service;

  beforeEach(module('<% if (parentModuleName) { %><%= parentModuleName %>.<% } %><%= moduleName %>'));

  beforeEach(inject((<%= upperCamel %>) => {
    service = <%= upperCamel %>;
  }));

  it('should equal <%= upperCamel %>', () => {
    expect(service.get()).<% if (testFramework === 'mocha') { %>to.equal<% } else { %>toEqual<% } %>('<%= upperCamel %>');
  });
});