Updates on Inspec - Javascript BDD Framework
Posted on
April 24, 2009
For the past two weeks, a lot of improvements has been done for Inspec, here is the list:
- Better scoping / sandboxing
- Support for Rhino, SpiderMonkey, Johnson and WSCript
- Tested to work with IE7, Firefox 3, Chrome and Safari 3
- Added a lot more specs to test Inspec
- Fixed a bug where cascading before / after blocks not getting the correct scoping / sandboxing
- Changed BDD syntax a bit to be compatible with Screw.Unit
- Shamelessly stole all matchers from Screw.Unit
- Added the following matchers:
- beA – instanceof test
- throwError – takes an function, and see if it throws an error
- respondTo – test if an object has a function
- have – see if an object or array contains something
I’m working on some advanced features that requires some pretty big structural changes right now. They are:
- Support for multiple definition of same behaviors.
- Support for multiple definition of before / after blocks.
- Redo shared example groups ( Allows for sharing local scope variables inside shared example groups)
I plan to finish this feature while I’m taking a business trip to Boston this coming Sunday.
For future, the plan follows:
- Spec, spec spec, 100% coverage require!
- Extract and improve rendering logic from HTMLReporter to HTMLReporter.FlatFormatter
- Implement HTMLReporter.NestedFormater
- Implement HTMLReporter.CompactFormater
- Implement ConsoleReporter.FlatFormatter
- Implement ConsoleReporter.NestedFormater
- Implement ConsoleReporter.CompactFormater
- Implement options for choose formatters, need to consider extending
- Add statistics functionality to Reporter Class
- Test on different browsers
- Selective Behavior Execution support
- Prioritize object printing with toString() if object has customized toString
- Documentation
- Make a wiki
That’s a lot of stuff to complete! If anyone interested please fork Inspec
blog comments powered by
Disqus