Check Content-Type
Testing a simple static file server is made simple when using SuperTest. It permits for the testing of HTTP methods, content-type, response body and many more options.
Supposedly you wish to test a basic http server which serves the common zip, jpg, and html files. This server example uses only the native Nodejs modules: http
, fs
, and path
: