Closed hoIIer closed 8 years ago
@erichonkanen the latest release runs into an ember-cli bug. Make sure you have ember-sinon
0.5.1 included as a dependency in your app, in addition to ember-sinon-qunit
. Otherwise the imports will fail, as sinon
does not get setup correctly.
The import you are asking about comes from here. When ember-cli merges the addon with your app, it moves the test-support
files to your-app-name/tests/ember-sinon-qunit
I've just released v1.3.3 to re-add the blueprint that adds ember-sinon to your app; sorry about that!
hey @elwayman02 thanks for updating, do I need to run any ember generate
type commands after running ember install ember-sinon-qunit
? I ran that but I dont see the folder showing up
@erichonkanen you won't see the folder show up in your app. Ember-cli only adds them at build time, which means that when you run ember test
, the file will automagickally be there!
I see, do I still need to have that dependency on ember-sinon after your last release?
here is my test:
import { moduleFor } from 'ember-qunit'
import test from 'clientweb/tests/ember-sinon-qunit/test'
moduleFor 'service:wamp', 'Unit | Service | wamp', {}
test 'it gets a new connection when `initiate` method is called', (assert)->
service = @subject()
debugger
assert.ok service
here is the command Im running (Im trying to load it in a browser because I wanted to poke around via debugger to get better idea of some things... / new to unit testing in ember)
docker run --rm -p 4200:4200 clientweb ember test --server --test-port 4200 --module "service:wamp"
seems like it's not importing though
Yes, you will still need the dependency on ember-sinon
. This is due to an upstream bug in ember-cli that won't be fixed until ember-cli 2.7 (which is not released yet).
ok got it thanks!
Hello,
I have installed this and then done the following but it doesn't seem to be importing...
why is the import
app/tests/ember-sinon-qunit/test
? that folder doesnt exist