25 lines
624 B
HTML
25 lines
624 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<meta charset="utf-8">
|
||
|
<title>QUnit</title>
|
||
|
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.22.0.css">
|
||
|
|
||
|
<body>
|
||
|
<div id="qunit"></div>
|
||
|
<div id="qunit-fixture"></div>
|
||
|
<script src="https://code.jquery.com/qunit/qunit-2.22.0.js"></script>
|
||
|
<!-- <script src="your_app.test.js"></script> -->
|
||
|
<script>
|
||
|
function add(a, b) {
|
||
|
return a + b;
|
||
|
}
|
||
|
|
||
|
QUnit.module('add', function() {
|
||
|
QUnit.test('two numbers', function(assert) {
|
||
|
assert.equal(add(1, 2), 3);
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
|
||
|
</html>
|