Commit a8e93b2e authored by Sofia Aicha Delijaj's avatar Sofia Aicha Delijaj
Browse files

wip tests

parent 916aa871
This diff is collapsed.
......@@ -4,7 +4,6 @@ var request = require("request");
describe("Server responses?", function() {
describe("Recieving the data", function() {
var url = "http://localhost:3000/checkLogin";
it("returns answer of logging", function(done) {
......@@ -18,8 +17,7 @@ describe("Server responses?", function() {
});
describe("Showing the friend list? ", function() {
var url = "http://localhost:3000//allfriends";
var url = "http://localhost:3000/allfriends";
it("returns false status", function(done) {
request(url, function(error, response, body) {
var hey = JSON.parse(body);
......@@ -29,4 +27,21 @@ describe("Showing the friend list? ", function() {
});
});
});
describe("Showing pikachu ", function() {
var url = "http://localhost:3000/allpokemon";
it("returns a pokemon", function(done) {
request(url, function(error, res) {
var hey = Array.from(res)
console.log(res)
expect(hey.id_pokemon).to.include.members(25);
if (err) {
return console.error('this failed:', err);
}
done();
});
});
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment