environment: Port environment.js to be an ES module
Removes the init() function in favor of executing all environment changes when the file is imported. Additionally ports all unit tests using imports.gi.environment.init() to use the updated module. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2822>
This commit is contained in:
@ -2,16 +2,14 @@
|
||||
|
||||
// Test cases for version comparison
|
||||
|
||||
import '../../js/ui/environment.js';
|
||||
import GObject from 'gi://GObject';
|
||||
|
||||
const JsUnit = imports.jsUnit;
|
||||
const Signals = imports.misc.signals;
|
||||
|
||||
const Environment = imports.ui.environment;
|
||||
const {TransientSignalHolder, registerDestroyableType} = imports.misc.signalTracker;
|
||||
|
||||
Environment.init();
|
||||
|
||||
const Destroyable = GObject.registerClass({
|
||||
Signals: {'destroy': {}},
|
||||
}, class Destroyable extends GObject.Object {});
|
||||
|
Reference in New Issue
Block a user