Created
February 18, 2013 14:51
-
-
Save serby/4977948 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var request = require('supertest') | |
| , express = require('express') | |
| , app = express() | |
| app.get('/', function (req, res) { | |
| res.end() | |
| }) | |
| var server = app.listen(function () { | |
| request(app) | |
| .get('/') | |
| .expect(200) | |
| .end(function () { | |
| console.log('supertest request completed') | |
| server.close() | |
| }) | |
| }) | |
| process.on('exit', function () { | |
| console.log('You will never see this.') | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment