signal-desktop/test/index.html

64 lines
1.7 KiB
HTML
Raw Normal View History

2022-05-27 22:12:01 +00:00
<!-- Copyright 2014-2022 Signal Messenger, LLC -->
2020-10-30 20:34:04 +00:00
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
2014-09-01 18:52:58 +00:00
<html>
2021-06-23 18:18:47 +00:00
<head>
<meta charset="utf-8" />
<title>TextSecure test runner</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
<link rel="stylesheet" href="../stylesheets/manifest.css" />
</head>
<body>
<div id="mocha"></div>
<div id="tests"></div>
<script type="text/javascript" src="../js/components.js"></script>
<script
type="text/javascript"
src="../ts/backbone/reliable_trigger.js"
2021-06-23 18:18:47 +00:00
></script>
2021-12-09 08:06:04 +00:00
<script
type="text/javascript"
src="../node_modules/mocha/mocha.js"
></script>
<script type="text/javascript">
mocha.setup('bdd');
</script>
2021-06-23 18:18:47 +00:00
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript">
2021-07-13 18:54:53 +00:00
window.Signal.conversationControllerStart();
2021-06-23 18:18:47 +00:00
window.testUtilities.prepareTests();
delete window.testUtilities.prepareTests;
2021-12-09 08:06:04 +00:00
!(function () {
const passed = [];
const failed = [];
class Reporter extends Mocha.reporters.HTML {
constructor(runner, options) {
super(runner, options);
runner.on('pass', test => passed.push(test.fullTitle()));
runner.on('fail', (test, error) => {
failed.push({
testName: test.fullTitle(),
error: error?.stack || String(error),
});
});
runner.on('end', () =>
window.testUtilities.onComplete({ passed, failed })
);
2021-12-09 08:06:04 +00:00
}
}
mocha.reporter(Reporter);
2021-07-13 18:54:53 +00:00
2021-12-09 08:06:04 +00:00
mocha.run();
})();
2021-06-23 18:18:47 +00:00
</script>
</body>
2014-09-01 18:52:58 +00:00
</html>