2014-01-17 173 views
1

我想測試我的網站與茉莉的服務器端的node.js節點JS茉莉測試

it("Logs you out", function (done){ 
    request("http://localhost:43030/logout", function(error, response, body){ 
     expect(body).toBe("You have successfully logged out); 
     done(); 
    }); 
}); 

輸出爲:

Stacktrace: 
    Error: Expected '{ 
    "isVerified": false, 
    "meta": { 
    "description": "You have successfully logged out.", 
    "timestamp": "2014-01-17T12:37:54.500Z" 
    } 

我怎樣才能meta描述的價值?

expect(body.description).toBe("You have successfully logged out); ? 

謝謝!

回答

0

我不知道有關的反應,但它不應該是:

expect(body.meta.description).toBe("You have successfully logged out.");