Skip to content

test:client Mocha spec broken for new route #2213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
dhaazen opened this issue Sep 6, 2016 · 1 comment
Open
1 task done

test:client Mocha spec broken for new route #2213

dhaazen opened this issue Sep 6, 2016 · 1 comment
Labels

Comments

@dhaazen
Copy link

dhaazen commented Sep 6, 2016

  • 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));
@Awk34 Awk34 added the bug label Sep 13, 2016
@Awk34
Copy link
Member

Awk34 commented Sep 13, 2016

This is an issue with DaftMonk/generator-ng-component, but we'll definitely want to update out depended version once the bug is fixed.

@Awk34 Awk34 added the V4 label Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants