Skip to content

javascript-me/first-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

first-server

Install Dependency

npm install mocha test/adder-test.js

Run index.js test

node src/index.js

Open another console, then

mocha test/index-test.js

Run index-square.js test

node src/index-square.js

Open another console, then

mocha test/index-square-test.js

mocha test/index-square-test-with-mock-http.js

Asynchronous Test

https://github.com/javascript-me/first-server/blob/master/test/indexTest.js

To DO

When the service is not up, there is an error when running test like this:

Error: connect ECONNREFUSED 127.0.0.1:3333
    at Object.exports._errnoException (util.js:907:11)
    at exports._exceptionWithHostPort (util.js:930:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1077:14)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published