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

Output promises customization #38

Closed
wants to merge 15 commits into from
Closed

Output promises customization #38

wants to merge 15 commits into from

Conversation

sebv
Copy link
Contributor

@sebv sebv commented Oct 25, 2013

Current output promizes only have a then method added to the chai object. This does not change the default behavior, but optionally enable better integration with Q or other custom promise environment.

see #37.

@domenic
Copy link
Collaborator

domenic commented Oct 25, 2013

Thanks! I agree providing something like this is a good idea. I'll use your code as the basis for it. However, I'll be making a few modifications:

  • There will be no built-in support for Q, and thus no string overload to promisifyWith or promisifyMethods property. You can publish a Q + Chai as Promised integrator as its own npm package!
  • The method promisifyWith will exist on the chaiAsPromised object, not on the chai object.

I'll get around to this this weekend. Awesome work, and thanks for putting in the effort!

@sebv
Copy link
Contributor Author

sebv commented Oct 25, 2013

Great!

I also wanted to do the config within chai-as-promised, but could not see an easy way to do it, since there seem to be no state.

No problem for Q, it can just be documented.

Here is another concrete usage example.

@domenic
Copy link
Collaborator

domenic commented Oct 27, 2013

Merged as 6eba483, revised in cb59ba9, and released as 4.1.0. Thanks!

@geekytime
Copy link

Did anyone ever end-up releasing a full Q integration as a module using the transferPromiseness approach?

@sebv
Copy link
Contributor Author

sebv commented Nov 23, 2013

Probably not yet, here is an example of integration.

I think if you try to mixin the full Q api, there are a few naming collisions (like keys).

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

Successfully merging this pull request may close these issues.

None yet

3 participants