Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests never end #126

Closed
tommy31 opened this issue Dec 11, 2014 · 1 comment
Closed

Tests never end #126

tommy31 opened this issue Dec 11, 2014 · 1 comment

Comments

@tommy31
Copy link

tommy31 commented Dec 11, 2014

Can someone explain to me what i'm doing wrong? Because my test never end..

var express     = require('express');
var test           = require('tape');

test('test', function (t) {
        var app;

    t.plan(1);

        function start() {
           t.pass('server started');
        }

        function error(err) {
           t.error(err, 'server startup failed');
        }

        app = express();

    app.listen('8080', 'localhost', function(err) {
       if (err) return error(err)

       return start();
    });
});

Outputs :

tape tests/*.js

TAP version 13
# test
ok 1 server started
@Raynos
Copy link
Collaborator

Raynos commented Dec 12, 2014

@tommy31

You forgot app.close()

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants