I'm currently working on a new Date class with some extra clock skew features. I want to fully test it so I can guarantee it is a drop in replacement for the existing Date class.
So coming from the Ruby world - we have a rubyspec project which is a test suite for all of the standard features, so that different interpreters can easily be compared.
I've been looking around for something similar in JavaScript. The only thing I've found so far is the JavaScript Test Library. I've ended up porting some of them acros开发者_如何学运维s to Jasmine so that I can run them easily in multiple browsers.
Is there something better I can use? It seems like this type of thing would be really valuable.
You should look in to JsTestDriver. It is a Google project. You can set it up so that it will run your tests across multiple browsers and OSes. Also, you don't need to write any kind of HTML test pages, you just write your tests in JavaScript, which is really nice.
http://code.google.com/p/js-test-driver/
My choice is Cucumber-JS:
- Describe behaviour(Specs) in plain text.
- Gherkin: Business Readable, Domain Specific Language
- Reusability(language independent): even on other projects and other languages.
- Gerneration PDF/HTML Documents.
- Custom Formatters
- Supports Node.js and modern web browsers
精彩评论