js-spec is submitted!
Your script is now in the approval queue. After a quick review we will notify you of the script's status by email. If everything's alright, we'll publish your work to the site and rss feed. Otherwise, we'll send you the email explaining what seems questionable. In that case, reply to the email whenever we should review the script again.
Also, don't hesitate to discuss things if you feel that our reasons are unfair. We are real folk, and we don't like bureaucracy. : )
Thank you for your contribution!
1
Want to do BDD in Javascript? This aims to clone rspec (
http://rspec.rubyforge.org) in javascript.
For now it's very basic, but stuff like the following works.
describe("A newly created Tic-Tac-Toe", function() {
with (this) {
before("each", function() {
this.game = new TicTacToe();
});
it("should have 9 empty cells", function() {
game.cells.should( have(9, "items") );
game.cells.each(function(cell) {
cell.should( be(undefined) );
});
});
it("should have 0 players", function() {
game.should( have(0, "players") );
});
}
});
Stay tuned for more :)
Ask questions, make suggestions and post bugs at
http://code.google.com/p/js-spec/issues/
- Website:
-
js-spec
- Author:
-
foca
- Size:
- 11.7 KB
- Last modified:
- 12/21/2007
- License:
-
MIT
- Tags:
- syntactic sugar, testing
- Rating:
-
4
(4/5 from 2 votes)
- Your rating:
-
0
Not yet rated
- Please sign in or register to rate this script
- You can't rate your own script.