File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < meta name ="viewport " content ="width=device-width,initial-scale=1 " />
6+ < title > Hello HTML</ title >
7+ < link rel ="stylesheet " href ="/style.css " />
8+ </ head >
9+ < body >
10+ < h1 > Hello, HTML.</ h1 >
11+ </ body >
12+ </ html >
Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ const request = require("supertest");
33const server = require ( "../src/server" ) ;
44
55describe ( "server" , ( ) => {
6- // 2 .1
7- it ( 'should return "Hello Express" when GET "/" is called' , ( ) => {
6+ // 3 .1
7+ it ( 'should return HTML when GET "/" is called' , ( ) => {
88 return request ( server )
99 . get ( "/" )
10+ . expect ( "Content-type" , / h t m l / )
1011 . expect ( 200 )
1112 . then ( response => {
12- assert . equal ( response . text , "Hello Express" ) ;
13+ assert . ok ( response . text . match ( / < ! D O C T Y P E h t m l > / ) ) ;
1314 } ) ;
1415 } ) ;
1516 after ( ( ) => {
You can’t perform that action at this time.
0 commit comments