Permalink
Browse files

1.1.0

Removed parallel.
Better output.
Added `sync` option for tests that stub their asynchronous parts.
  • Loading branch information...
masylum committed Mar 19, 2011
1 parent df78922 commit b90f995a784ba40ca3a60896b0b5f115fe5a9a50
Showing with 44 additions and 2 deletions.
  1. +1 −1 tests/app.js
  2. +1 −1 tests/serial.js
  3. +42 −0 tests/sync.js
View
@@ -1,7 +1,7 @@
var express = require('express'),
app = express.createServer();
-app.use(express.bodyDecoder());
+app.use(express.bodyParser());
app.get('/', function (req, res) {
setTimeout(function () {
View
@@ -1,4 +1,4 @@
-var testosterone = require('../lib/testosterone')({port: 3000, title: 'Testing serial things'}),
+var testosterone = require('../lib/testosterone')({port: 3000, title: 'Core Testosterone'}),
add = testosterone.add,
order = 0,
assert = testosterone.assert;
View
@@ -0,0 +1,42 @@
+var testosterone = require('../lib/testosterone')({port: 3000, title: 'Testing synchronous', async: false}),
+ add = testosterone.add,
+ order = 0,
+ assert = testosterone.assert;
+
+testosterone
+ .add(
+ 'GIVEN a `first` sync `thing` \n' +
+ 'WHEN something `happens` \n' +
+ 'THEN it should bla',
+
+ function (cb) {
+ assert.equal(1, 1);
+ }
+ )
+
+ .add(
+ 'GIVEN a `second` sync `thing` \n' +
+ 'WHEN something `happens` \n' +
+ 'THEN it should bla',
+
+ function (cb) {
+ for(var i = 0; i<100000000;i++) {
+ // do nothing
+ }
+ assert.equal(2, 2);
+ }
+ )
+
+ .add(
+ 'GIVEN a `third` sync `thing` \n' +
+ 'WHEN something `happens` \n' +
+ 'THEN it should bla',
+
+ function (cb) {
+ assert.equal(3, 3);
+ }
+ )
+
+ .serial(function () {
+ require('sys').print('done!');
+ });

0 comments on commit b90f995

Please sign in to comment.