mirror of
https://github.com/gundb/panic-server.git
synced 2026-01-15 00:08:05 -05:00
You can now boot up tests from the homepage using the UI. It's powered by jQuery. The tests are now using the latest, greatest version of gun, v0.3. Files now organized into folder "lib" for clarity and cleanliness. Numerous code cleanliness improvements. Now, if errors are passed to the acknowledgement listener, they're pushed to an array of errors on that request. Now each time there's a response, the statistics are recalculated and are passed to an optional progress callback. Patch.js now has stronger type checking against the data it's been given. Added more polyfills to aid in development, like wrapping console.log in a closure to bypass the console interface error. The timeout accuracy and code clarity has been improved. Server is now upgraded to use gun@0.3, and the level options have been better tailored to the application.
37 lines
664 B
JavaScript
37 lines
664 B
JavaScript
/*globals patch*/
|
|
var Browser;
|
|
(function () {
|
|
'use strict';
|
|
|
|
Browser = function (opt) {
|
|
if (!(this instanceof Browser)) {
|
|
return new Browser(opt);
|
|
}
|
|
var browser = this;
|
|
browser.opt = opt;
|
|
browser.window = window.open('./', browser.opt.id);
|
|
browser.window.addEventListener('load', function () {
|
|
browser.window.test(browser.opt);
|
|
|
|
opt.done.cb = (function () {
|
|
var cb = opt.done.cb;
|
|
return function (opt) {
|
|
if (cb) {
|
|
cb.apply(this, arguments);
|
|
}
|
|
browser.close();
|
|
};
|
|
}());
|
|
});
|
|
};
|
|
|
|
Browser.prototype = {
|
|
constructor: Browser,
|
|
close: function () {
|
|
this.window.close();
|
|
return this;
|
|
}
|
|
};
|
|
|
|
}());
|