diff --git a/src/Extensions.php b/src/Extensions.php
index <HASH>..<HASH> 100644
--- a/src/Extensions.php
+++ b/src/Extensions.php
@@ -668,7 +668,11 @@ class Extensions
             }
         }
 
-        if ($this->addjquery === true && $this->app['config']->getWhichEnd() === 'frontend') {
+        // While this looks slightly illogical, our CLI tests want to see that
+        // jQuery can be inserted, but we don't want it inserted on either the
+        // backend or AJAX requests.
+        $end = $this->app['config']->getWhichEnd();
+        if ($this->addjquery === true && ($end === 'frontend' || $end === 'cli')) {
             $html = $this->insertJquery($html);
         }
Also "allow" jQuery insertion when called from the CLI and leave a note as to why.