Skip to content

test:client Mocha spec broken for new route #2213

Open
@dhaazen

Description

@dhaazen
  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.0.4
Node 4.4.5
npm 3.10.5
Operating System OS X 10
etc etc
Item Answer
Transpiler Babel
Markup HTML
CSS CSS
Router ngRoute
Client Tests Mocha
DB SQL
Auth N
etc etc

Running gulp test:client on a new route created like so:

yo angular-fullstack:route about

produces the following error:

TypeError: Object is not a constructor (evaluating 'module('newProjectApp.about')')
  at /Users/haazen/workspace/projects/Personal/newProject/spec.js:43133

Resolved by simply adding the following import to the spec file:

import about from './about.component';

and changing the beforeEach from:

  beforeEach(module('newProjectApp.about'));

To:

  beforeEach(angular.mock.module(about));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions