Skip to content

Commit

Permalink
test: remove timer APIs now present in upstream GJS
Browse files Browse the repository at this point in the history
  • Loading branch information
andyholmes committed Aug 4, 2023
1 parent 78908f1 commit ff5077b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions installed-tests/minijasmine
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ function _formatStack(stack) {
.join('\n');
}

function _setTimeout(continueTimeout, func, time) {
return GLib.timeout_add(GLib.PRIORITY_DEFAULT, time, function () {
func();
return continueTimeout;
});
}

function _clearTimeout(id) {
if (id > 0)
GLib.source_remove(id);
}


/**
* Reporter that outputs according to the Test Anything Protocol
Expand Down Expand Up @@ -110,11 +98,6 @@ function initJasmine() {
const thisDir = GLib.path_get_dirname(thisFile);
imports.searchPath.unshift(thisDir);

// Install the browser setTimeout/setInterval API on the global object
globalThis.setTimeout = _setTimeout.bind(undefined, GLib.SOURCE_REMOVE);
globalThis.setInterval = _setTimeout.bind(undefined, GLib.SOURCE_CONTINUE);
globalThis.clearTimeout = globalThis.clearInterval = _clearTimeout;

// Load Jasmine
const jasmineRequire = imports.jasmine.getJasmineRequireObj();
const jasmineCore = jasmineRequire.core(jasmineRequire);
Expand Down

0 comments on commit ff5077b

Please sign in to comment.