javascript/JQunit

QUnit 사용하기 03

top2blue 2015. 7. 24. 16:11

test003.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>QUnit Example01</title>
    <link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.18.0.css">
    <script src="http://code.jquery.com/qunit/qunit-1.18.0.js"></script>
    <script type="text/javascript">
        // 구현코드를 넣는다.
 </script>
    <script src="test003.js"></script>
</head>
<body>
    <!-- 아래의 코드를 넣는다 -->
    <div id="qunit"></div>
    <div id="qunit-fixture"></div>
</body>
</html>
 
cs

test003.js

1
2
3
QUnit.test( "hello test"function( assert ) {
  assert.ok( 1 == "1""Passed!" );
});
cs