Permalink
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (46 sloc) 1.62 KB
<!doctype html>
<html>
<head>
<title>js-nacl in-browser tests</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('exports');</script>
<script src="../lib/nacl_factory.js"></script>
<script>
var assert = (function () {
var exports = {};
exports.fail = function (actual, expected, message, operator) {
if (typeof message === "undefined") {
message = "assertion failed: " + actual + " " + operator + " " + expected;
}
throw ({ actual: actual, expected: expected, message: message, operator: operator });
}
exports.equal = function (actual, expected, message) {
if (actual != expected) exports.fail(actual, expected, message, "==");
};
exports.notEqual = function (actual, expected, message) {
if (actual == expected) exports.fail(actual, expected, message, "!=");
};
exports.ok = function (v, m) { exports.equal(v, true, m); };
return exports;
})();
var nacl;
var suite = {};
</script>
<script src="tests.js"></script>
<script>
nacl_factory.instantiate(function (nacl_instance) {
nacl = nacl_instance;
mocha.suite.emit('require', suite);
mocha.run();
}, {
memoryInitializerPrefixURL: '../lib/'
});
</script>
</body>
</html>