Angular Project
This commit is contained in:
parent
d34f156ffa
commit
e93e83b6b8
|
@ -0,0 +1,26 @@
|
|||
var supertest = require("supertest");
|
||||
var should = require("should");
|
||||
|
||||
// This agent refers to PORT where the program is running.
|
||||
|
||||
var server = supertest.agent("http://localhost:4000");
|
||||
|
||||
// UNIT test begin
|
||||
|
||||
describe("SAMPLE unit test",function(){
|
||||
|
||||
// #1 should return home page
|
||||
it("should return home page",function(done){
|
||||
// calling home page
|
||||
server
|
||||
.get("/")
|
||||
.expect("Content-type",/text/)
|
||||
.expect(200) // THis is HTTP response
|
||||
.end(function(err,res){
|
||||
// HTTP status should be 200
|
||||
res.status.should.equal(200);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue