more tests

This commit is contained in:
juanelas 2019-12-12 09:12:43 +01:00
parent a6ff8476d2
commit a77349b73e
2 changed files with 48 additions and 0 deletions

23
test/browser/index2.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Primes</title>
<meta charset="UTF-8" />
</head>
<body>
<div id="syncPrime">result of primeSync() will show up here</div>
<div id="asyncPrime">result of prime() will show up here</div>
<script src="../../dist/bigint-crypto-utils-latest.browser.min.js"></script>
<script>
(async () => {
document.getElementById(
"syncPrime"
).innerHTML = bigintCryptoUtils.primeSync(123);
document.getElementById(
"asyncPrime"
).innerHTML = await bigintCryptoUtils.prime(123);
})();
</script>
</body>
</html>

25
test/browser/index3.html Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Primes</title>
<meta charset="UTF-8" />
</head>
<body>
<div id="syncPrime">result of primeSync() will show up here</div>
<div id="asyncPrime">result of prime() will show up here</div>
<script type="module">
import * as bigintCryptoUtils from '../../dist/bigint-crypto-utils-latest.browser.mod.min.js'
(async () => {
document.getElementById(
"syncPrime"
).innerHTML = bigintCryptoUtils.primeSync(123);
document.getElementById(
"asyncPrime"
).innerHTML = await bigintCryptoUtils.prime(123);
})();
</script>
</body>
</html>