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

How to use should.js in testacular environment? #227

Closed
davidshen84 opened this issue Dec 10, 2012 · 3 comments
Closed

How to use should.js in testacular environment? #227

davidshen84 opened this issue Dec 10, 2012 · 3 comments

Comments

@davidshen84
Copy link

I like Mocha, and I want to use should.js as my assertion method. But I have no idea how to load this lib. Testacular is not a NodeJs, so I cannot use require. Is there any magic to do this?

@dignifiedquire
Copy link
Member

As pointed out in tj/should.js#26 you can't use it in the browser. As all test you write in Testacular are run in the browser you can't use it. I suggest you have a look at chai.js and its should syntax. The syntax is nearly the same and it's fully usable in the browser. For a usage example have a look at this example.

@davidshen84
Copy link
Author

Thanks, I will give a try!

On Tue, Dec 11, 2012 at 12:00 AM, Friedel Ziegelmayer <
notifications@github.com> wrote:

As pointed out in tj/should.js#26https://github.com/visionmedia/should.js/issues/26you can't use it in the browser. As all test you write in Testacular are
run in the browser you can't use it. I suggest you have a look at chai.jshttp://chaijs.com/and its should
syntax http://chaijs.com/api/bdd/. The syntax is nearly the same and
it's fully usable in the browser. For a usage example have a look at this
examplehttps://github.com/vojtajina/testacular/tree/master/test/e2e/mocha
.


Reply to this email directly or view it on GitHubhttps://github.com/vojtajina/testacular/issues/227#issuecomment-11202036.

Regards,
David Shen

http://about.me/davidshen
https://twitter.com/#!/davidshen84

@jamesshore
Copy link
Contributor

FWIW, Chai won't work if you want to test against IE 8. The combination I've found to work reliably cross-platform is Testacular + Mocha + expect.js. I've used it to test IE 8, IE 9, Safari, Chrome, Firefox, and iOS Safari simultaneously.

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

3 participants