Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/autonome/External-Editor. Use an external editor of your choice to edit text in Firefox.
Something went wrong. Try again.
732 B · 32 lines
JavaScript
at master
123456789101112131415161718192021222324252627282930313233const main = require("main");
exports.test_test_run = function(test) { test.pass("Unit test running!");};
exports.test_id = function(test) { test.assert(require("self").id.length > 0);};
exports.test_url = function(test) { require("request").Request({ url: "http://www.mozilla.org/", onComplete: function(response) { test.assertEqual(response.statusText, "OK"); test.done(); } }).get(); test.waitUntilDone(20000);};
exports.test_open_tab = function(test) { const tabs = require("tabs"); tabs.open({ url: "http://www.mozilla.org/", onReady: function(tab) { test.assertEqual(tab.url, "http://www.mozilla.org/"); test.done(); } }); test.waitUntilDone(20000);};