using JEST to do unit test in JavaScript

using JEST to do unit test in JavaScript

instatllation

under the project folder , run the following command in terminal

npm install --save-dav jest 

write the class

function addFive(a){
	return a+5
}

write the test class

留言

熱門文章