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

Promise support #14

Open
antony opened this issue Aug 4, 2016 · 1 comment
Open

Promise support #14

antony opened this issue Aug 4, 2016 · 1 comment

Comments

@antony
Copy link

antony commented Aug 4, 2016

A question, really.

We've started using promises for a lot of our tests in order to get a cleaner, more readable structure.
We're using mocha-as-promised (previously just used co), which gives us tests which look like this:

it('some stuff', function * () {
  const value = yield someService.somePromise()
  expect(value).to.equal(5)
})

I can't seem to get data-driven to wrap this, as much as I'd like to. How difficult would it be (or is it already possible) to use data-driven along with generator functions?

Happy to do a PR if it's something that you think could be accomplished.

@mjtodd
Copy link
Contributor

mjtodd commented Aug 4, 2016

Hi. That's really interesting. I have used co before but not mocha-as-promised. From your sample it looks really nice.

I will take a look at trying it with data-driven and let you know.

Matt

On 4 Aug 2016, 18:05 +0100, Antony Jones notifications@github.com, wrote:

A question, really.

We've started using promises for a lot of our tests in order to get a cleaner, more readable structure.
We're using mocha-as-promised (previously just used co), which gives us tests which look like this:

it('some stuff', function * () { const value = yield someService.somePromise() expect(value).to.equal(5) })

I can't seem to get data-driven to wrap this, as much as I'd like to. How difficult would it be (or is it already possible) to use data-driven along with generator functions?

Happy to do a PR if it's something that you think could be accomplished.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (#14), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAhqqaTK9JQQQY_vf5TwEfiZXQoUI9YVks5qchvSgaJpZM4Jc6cR).

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