mirror of
https://github.com/amark/gun.git
synced 2025-05-28 17:56:51 +00:00

Move E2E panic tests into their own dedicated folder so mocha won't automatically attempt to run it. New npm script (`npm run e2e`) runs those tests with mocha explicitly. This solves a number of problems: - Travis-CI can't run the panic tests without a selenium server, which requires a ton more setup that simply hasn't been done yet. - Selenium-webdriver doesn't support node < v4, and immediately fails the build on those environments. If at any point in the future we want those tests to run automatically, here's what we'll need: - Browserstack or SauceLabs tunneling and auth env variables. - Bash script to detect node version and only install deps and run the tests if the environment supports it. Also, a number of tests had `.only` in front, preventing all the others from running. They've been removed.
27 lines
636 B
HTML
27 lines
636 B
HTML
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Holy grail demo</title>
|
|
</head>
|
|
<body>
|
|
<script src='panic.js'></script>
|
|
<script src='http://localhost:8080/gun.js'></script>
|
|
|
|
<script>
|
|
(function () {
|
|
var req = new XMLHttpRequest();
|
|
req.overrideMimeType('application/json');
|
|
req.open('GET', 'ports.json');
|
|
req.addEventListener('load', function () {
|
|
var ports = JSON.parse(req.responseText);
|
|
var server = 'http://localhost:' + ports.gun + '/gun';
|
|
window.gun = new Gun(server);
|
|
panic.server('http://localhost:' + ports.panic);
|
|
});
|
|
req.send();
|
|
}());
|
|
</script>
|
|
</body>
|
|
</html> |