summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2019-02-07 01:56:29 +0100
committerFlorian Müllner <fmuellner@gnome.org>2019-02-07 02:46:51 +0100
commitc6d57059ffea325f5be11bca38ea83c5ac5f23e0 (patch)
tree4bba293c1fedb068c6de5b977392c70f555f89e5 /tests
parent5f13cf767ed780cf53f467136a21b2210a720d9d (diff)
downloadgnome-shell-c6d57059ffea325f5be11bca38ea83c5ac5f23e0.tar.gz
tests: Work around import dependency loop
The markup unit test currently fails with the following message: TypeError: class heritage MessageList.Message is not an object or null This is because MessageList imports other modules that end up importing MessageList themselves in order to inherit from one of its classes. But as the MessageList imports hasn't finished yet (it's still processing its own imports), that class hasn't been defined yet. Work around that by importing Main first, so that the importer can process imports in a proper order.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/markup.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit/markup.js b/tests/unit/markup.js
index c55791ea5..603ca8194 100644
--- a/tests/unit/markup.js
+++ b/tests/unit/markup.js
@@ -8,6 +8,7 @@ const Pango = imports.gi.Pango;
const Environment = imports.ui.environment;
Environment.init();
+const Main = imports.ui.main; // unused, but needed to break dependency loop
const MessageList = imports.ui.messageList;
// Assert that @input, assumed to be markup, gets "fixed" to @output,