Team oppgave og litt unit-testing
This commit is contained in:
parent
fe625a2b6d
commit
29e6711d13
12 changed files with 526 additions and 47 deletions
25
MVC/unit_testing.html
Normal file
25
MVC/unit_testing.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue