Skip to content

Instantly share code, notes, and snippets.

@naosim
Created February 25, 2023 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naosim/6131c2b0cddf5b1582d86f2371f3e41f to your computer and use it in GitHub Desktop.
Save naosim/6131c2b0cddf5b1582d86f2371f3e41f to your computer and use it in GitHub Desktop.
<!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