From c4dcf510ef44ccb4882bb272f68e5c8600a14559 Mon Sep 17 00:00:00 2001 From: ento Date: Sat, 5 Dec 2020 23:29:34 -0800 Subject: [PATCH] Ensure jasmine-plugin startup module is executed in the right order (#5210) --- plugins/tiddlywiki/jasmine/jasmine-plugin.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/tiddlywiki/jasmine/jasmine-plugin.js b/plugins/tiddlywiki/jasmine/jasmine-plugin.js index 3c79201c6..34c5b5831 100644 --- a/plugins/tiddlywiki/jasmine/jasmine-plugin.js +++ b/plugins/tiddlywiki/jasmine/jasmine-plugin.js @@ -14,6 +14,15 @@ The main module of the Jasmine test plugin for TiddlyWiki5 var TEST_TIDDLER_FILTER = "[type[application/javascript]tag[$:/tags/test-spec]]"; +// Ensure this startup module is executed in the right order. +// Jasmine calls `process.exit()` with a non-zero exit code if there's +// any failed tests. Because of that, we want to make sure all critical +// startup modules are run before this one. +// * The "commands" module handles the --rendertiddler command-line flag, +// which is typically given to export an HTML file that can be opened with +// a browser to run tests. +exports.after = ["commands"]; + /* Startup function for running tests