aurelia / router

A powerful client-side router.
MIT License
120 stars 115 forks source link

Unit test from Karma fails when adding 'Redirect' into app.js #160

Closed urbaitel closed 9 years ago

urbaitel commented 9 years ago

If you follow the instructions here to add Redirect into app.js for Authentication handling in the Router, the unit tests fail.

http://aurelia.io/docs.html#customizing-the-navigation-pipeline

Added to top of app.js:

import {Redirect} from 'aurelia-router';

Error:

Chrome 43.0.2357 (Mac OS X 10.10.3) ERROR
  Uncaught TypeError: Error loading "..." at ...
  inject is not a function
  at /usr/local/lib/node_modules/karma-jspm/src/adapter.js:59

NOTE: I removed my file names and location. It listed the first .js file from main page.

urbaitel commented 9 years ago

Any ETA on reviewing this? It's critical for me as I'm adding authentication to my app and would like to continue unit testing the router.

bryanrsmith commented 9 years ago

@zewa666 Any idea on this? It runs fine in the browser.

zewa666 commented 9 years ago

@urbaitel for me the same things fails, to be specific the flickr test. Now could you test something out for me? Please just add the same import you stated above as the very first line in the test.spec file where the issue happens and tell me what happens.

bryanrsmith commented 9 years ago

@urbaitel were you able to get this working?

bryanrsmith commented 9 years ago

I'm going to go ahead and close since I haven't heard anything. Please reopen if there's still something we need to do on our end.