Created
February 25, 2023 23:11
-
-
Save naosim/6131c2b0cddf5b1582d86f2371f3e41f to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<meta charset="utf-8" /> | |
<!-- tinytestをGitHub Pagesにホスト --> | |
<script src="https://naosim.github.io/jstinytest/tinytest.js"></script> | |
<h1>test</h1> | |
<script> | |
// product code | |
function add(a, b) { | |
return a + b; | |
} | |
// test code | |
tests({ | |
"adds numbers": function () { | |
eq(6, add(2, 4)); | |
eq(6.4, add(2.4, 4)); | |
}, | |
"subtracts numbers": function () { | |
eq(-2, add(2, -4)); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment