snort/packages/nostr/test/browser/index.html

46 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/mocha/mocha.css" />
</head>
<body>
<div style="margin-left: 5px; margin-top: 15px">
<a style="color: var(--mocha-color)" id="window.nostr"></a>
</div>
<script>
const a = document.getElementById("window.nostr")
if (window.location.pathname === "/nostr-object") {
a.href = "/"
a.innerHTML = "disable window.nostr"
} else {
a.href = "/nostr-object"
a.innerHTML = "enable window.nostr"
}
</script>
<div id="mocha"></div>
<script src="https://unpkg.com/mocha/mocha.js"></script>
<script class="mocha-init">
mocha.setup({
ui: "bdd",
timeout: "5s",
global: ["nostr"],
})
mocha.checkLeaks()
</script>
<!-- The server replaces the following line with <script> tags for all tests. -->
<!-- TESTS -->
<script class="mocha-exec">
mocha.run()
</script>
</body>
</html>