git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / errorhandler / errorhandler.js

376 bytesRaw
1'use strict';
2
3var errorhandler = require('errorhandler');
4var noop = function () {};
5var req = { headers: { Accept: 'text/html' } };
6var res = { setHeader: noop, end: noop };
7
8var middleware = errorhandler();
9var wasCalled = false;
10
11middleware('Message', req, res, function () {
12 wasCalled = true;
13});
14
15setTimeout(function () {
16 if (!wasCalled) console.log('ok');
17}, 200);
18

Built with git-ssb-web