We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69997cb commit a84e73bCopy full SHA for a84e73b
examples/hello-world/index.js
@@ -1,6 +1,6 @@
1
var express = require('../../');
2
3
-var app = express();
+var app = module.exports = express()
4
5
app.get('/', function(req, res){
6
res.send('Hello World');
test/acceptance/hello-world.js
@@ -0,0 +1,21 @@
+
+var app = require('../../examples/hello-world')
+var request = require('supertest')
+describe('hello-world', function () {
+ describe('GET /', function () {
7
+ it('should respond with hello world', function (done) {
8
+ request(app)
9
+ .get('/')
10
+ .expect(200, 'Hello World', done)
11
+ })
12
13
14
+ describe('GET /missing', function () {
15
+ it('should respond with 404', function (done) {
16
17
+ .get('/missing')
18
+ .expect(404, done)
19
20
21
+})
0 commit comments