Skip to content

Instantly share code, notes, and snippets.

@validkeys
Created July 19, 2014 19:49
Show Gist options
  • Select an option

  • Save validkeys/c46e550ef87be0fe996f to your computer and use it in GitHub Desktop.

Select an option

Save validkeys/c46e550ef87be0fe996f to your computer and use it in GitHub Desktop.
`import { test, moduleForComponent } from 'ember-qunit'`
moduleForComponent 'iteration-card', 'IterationCardComponent', {
# specify the other units that are required for this test
# needs: ['component:foo', 'helper:bar']
}
test 'it renders', ->
expect 2
# creates the component instance
component = @subject()
equal component.state, 'preRender'
# appends the component to the page
@append()
equal component.state, 'inDOM'
@validkeys
Copy link
Author

Here's the stack trace:

Died on test #2 at test (http://localhost:4200/assets/vendor.js:99950:13)
at eval (client/tests/unit/components/iteration-card-test.js:9:5)
at requireModule (http://localhost:4200/assets/vendor.js:54:29)
at http://localhost:4200/assets/test-loader.js:14:29: Cannot read property 'router' of undefined
Source:
TypeError: Cannot read property 'router' of undefined
at computeLinkViewRouteArgs (http://localhost:4200/assets/vendor.js:32521:62)
at Descriptor.ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:25043:25)
at get (http://localhost:4200/assets/vendor.js:29653:21)
at computeLinkViewLoading (http://localhost:4200/assets/vendor.js:32370:14)
at Descriptor.ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:25043:25)
at get (http://localhost:4200/assets/vendor.js:29653:21)
at computeLinkViewActive (http://localhost:4200/assets/vendor.js:32318:13)
at Descriptor.ComputedPropertyPrototype.get (http://localhost:4200/assets/vendor.js:25043:25)
at get (http://localhost:4200/assets/vendor.js:29653:21)
at CoreView.extend._classStringForProperty (http://localhost:4200/assets/vendor.js:53819:19)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment