Created
October 13, 2012 18:05
-
-
Save rotoshine/3885593 to your computer and use it in GitHub Desktop.
Calculator.add test2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Calculator Test</title> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.10.0.css"> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.10.0.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script> | |
<script type="text/javascript" src="Calculator.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
test("add 함수 테스트", function(){ | |
ok(Calcurator.hasOwnProperty("add"), "add 함수 존재"); | |
equal(Calcurator.add(1, 2), 3, "add 함수에 1과 2를 더한 결과는 3"); | |
equal(Calcurator.add("1", 2), 3, "add 함수에 1(문자열)과 2를 더한 결과는 3"); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment