Async testing with vows using the http.get library in Node.js

前端 未结 2 507
迷失自我
迷失自我 2021-01-14 20:30

I\'m having a doozie of a time trying to get a basic http test to work with vows.

I think I\'ve followed the async example from vows http://vowsjs.org/#-writing-asyn

2条回答
  •  悲哀的现实
    2021-01-14 21:16

    It is actually missing in the documentations which is still a bit short. But you can get a glimpse of it here in this page :

    'when peeled *asynchronously*': {
            topic: function (banana) {
                banana.peel(this.callback);
            },
            'results in a `PeeledBanana`': function (err, result) {
                assert.instanceOf (result, PeeledBanana);
            }
        }
    

    As it was said by Morten Siebuhr and Ruben Tan, this is how vows works and that is why it works like that.

提交回复
热议问题