         delete res.body.cookie
         t.deepEqual res.body, {}
 
-        shutdown()
-      .then ->
+      .finally ->
+        shutdown()
+      .finally ->
         t.end()
 
 test 'token', (t) ->

        t.equal res.statusCode, 200
        t.equal res.headers['content-type'], 'text/html; charset=utf-8'
        t.equal res.body, '<div id="content"></div>'
        shutdown()
      .then ->
        t.end()

test 'react kup', (t) ->

        t.equal res.statusCode, 200
        t.equal res.headers['content-type'], 'text/html; charset=utf-8'
        t.equal res.body, '<html><head><meta name="robots" content="index,follow" /><meta name="keywords" content="test" /></head><body><div id="container"><div id="navigation-wrapper"><div id="navigation"></div></div><div id="content-wrapper"><span>content</span></div></div></body></html>'

      .finally ->
        shutdown()
      .finally ->
        t.end()

test 'react', (t) ->
