xdissent / meteor-cucumber

CucumberJS test runner and Velocity reporter with Selenium Webdriver and Zombie support
10 stars 2 forks source link

Assertion package #5

Open queso opened 10 years ago

queso commented 10 years ago

Have you put any thought into including something like Chai for assertion support?

xdissent commented 10 years ago

I envision additional meteorite packages that extend/add cucumber World classes with support for various other libraries. The protractor, zombie, and selenium worlds would probably move to separate packages at that point too. Open to suggestion though

queso commented 10 years ago

I guess I don't fully grok the cucumber world classes much, so I am not sure how I would hook that in.

Assuming we had a Chai world, how would that reconcile with a Zombie world?

queso commented 10 years ago

This actually turned out easier than I thought. I added chai mrt add chai and then just put chai.should() in my world constructor and now all my tests have the should syntax of chai enabled!

xdissent commented 10 years ago

Awesome! I was thinking about it last night and things like assertion libraries probably don't need an actual world, since they're usually loaded globally. Glad it worked out!

queso commented 10 years ago

Yeah, this seems easier enough to do, just need to doc it in the readme.