-
-
Save jmreidy/1309827 to your computer and use it in GitHub Desktop.
Testing vows-bdd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pruebas para la creacion de un usuario en el sitio | |
*/ | |
var Feature = require('vows-bdd').Feature, | |
http = require('http'), | |
assert = require('assert'); | |
Feature('Creando un usuario', module) | |
.scenario('creando un usuario usando el registro') | |
.given('El servidor esta corriendo', function(){ | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(3000, "127.0.0.1", this.callback); | |
}) | |
.when('Visito el index', function() { | |
this.callback(); | |
}) | |
.then('run a test', function() { | |
assert.ok(true); | |
}) | |
.complete(function(){console.log('terminando')}) | |
.finish(module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot!!