Skip to content
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

rejected not available in konacha command line? #13

Closed
matthijsgroen opened this issue Jan 5, 2013 · 4 comments
Closed

rejected not available in konacha command line? #13

matthijsgroen opened this issue Jan 5, 2013 · 4 comments

Comments

@matthijsgroen
Copy link
Member

When I have the following test:

it 'rejects the promise', (done) ->
  def = Q.defer()
  def.reject('raise error')
  def.promise.should.be.rejected.and.notify(done)

When I run the suite using rake konacha:run the test fails, stating "TypeError: 'undefined' is not a function". When I run the test in the browser, it passes.

I don't know where in the test it fails but it looks like the keyword rejected has something to do with it. In a test where I test should.become(@something) it passes in the CLI and in the browser.

So chai-as-promised seems to be loaded correctly.

Any hints what the cause of this failure on the CLI could be?

@domenic
Copy link
Collaborator

domenic commented Jan 6, 2013

Are you using Chai-jQuery as well by any chance? It does some stuff with be that might be causing this.

@matthijsgroen
Copy link
Member Author

Yeah I am, I will check if that could be the cause, thanks for the pointer!

@matthijsgroen
Copy link
Member Author

without the 'be' word and disabling chai-jquery the error message is the same :-/

@domenic
Copy link
Collaborator

domenic commented Jan 10, 2013

Grr OK will try to find time to set up this Konacha thing this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants