diff --git a/core/drupalci.yml b/core/drupalci.yml
index ed02d43c63..155a840e15 100644
--- a/core/drupalci.yml
+++ b/core/drupalci.yml
@@ -19,31 +19,6 @@ build:
       # halt-on-fail can be set on the run_tests tasks in order to fail fast.
       # suppress-deprecations is false in order to be alerted to usages of
       # deprecated code.
-      run_tests.phpunit:
-        types: 'PHPUnit-Unit'
-        testgroups: '--all'
-        suppress-deprecations: false
-        halt-on-fail: false
-      run_tests.kernel:
-        types: 'PHPUnit-Kernel'
-        testgroups: '--all'
-        suppress-deprecations: false
-        halt-on-fail: false
-      run_tests.simpletest:
-         types: 'Simpletest'
-         testgroups: '--all'
-         suppress-deprecations: false
-         halt-on-fail: false
-      run_tests.build:
-        types: 'PHPUnit-Build'
-        testgroups: '--all'
-        suppress-deprecations: false
-        halt-on-fail: false
-      run_tests.functional:
-        types: 'PHPUnit-Functional'
-        testgroups: '--all'
-        suppress-deprecations: false
-        halt-on-fail: false
       run_tests.javascript:
         concurrency: 15
         types: 'PHPUnit-FunctionalJavascript'
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.es6.js b/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.es6.js
deleted file mode 100644
index 90019bd659..0000000000
--- a/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.es6.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * @file
- *  Testing tools for deprecating JavaScript functions and class properties.
- */
-(function() {
-  if (typeof console !== 'undefined' && console.warn) {
-    const originalWarnFunction = console.warn;
-    console.warn = warning => {
-      const warnings = JSON.parse(
-        sessionStorage.getItem('js_deprecation_log_test.warnings') ||
-          JSON.stringify([]),
-      );
-      warnings.push(warning);
-      sessionStorage.setItem(
-        'js_deprecation_log_test.warnings',
-        JSON.stringify(warnings),
-      );
-      originalWarnFunction(warning);
-    };
-  }
-})();
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.js b/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.js
deleted file mode 100644
index e1724ebe48..0000000000
--- a/core/modules/system/tests/modules/js_deprecation_log_test/js/js_deprecation_log.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
-* DO NOT EDIT THIS FILE.
-* See the following change record for more information,
-* https://www.drupal.org/node/2815083
-* @preserve
-**/
-
-(function () {
-  if (typeof console !== 'undefined' && console.warn) {
-    var originalWarnFunction = console.warn;
-    console.warn = function (warning) {
-      var warnings = JSON.parse(sessionStorage.getItem('js_deprecation_log_test.warnings') || JSON.stringify([]));
-      warnings.push(warning);
-      sessionStorage.setItem('js_deprecation_log_test.warnings', JSON.stringify(warnings));
-      originalWarnFunction(warning);
-    };
-  }
-})();
\ No newline at end of file
diff --git a/core/modules/system/tests/modules/js_errors_test/js/js_errors_test.es6.js b/core/modules/system/tests/modules/js_errors_test/js/js_errors_test.es6.js
new file mode 100644
index 0000000000..0fdab893ca
--- /dev/null
+++ b/core/modules/system/tests/modules/js_errors_test/js/js_errors_test.es6.js
@@ -0,0 +1,11 @@
+/**
+ * @file
+ *  Testing tools for JavaScript errors.
+ */
+(function({ throwError, behaviors }) {
+  behaviors.testErrors = {
+    attach: () => {
+      throwError(new Error('A manually thrown error.'));
+    },
+  };
+})(Drupal);
diff --git a/core/modules/system/tests/modules/js_errors_test/js/js_errors_test.js b/core/modules/system/tests/modules/js_errors_test/js/js_errors_test.js
new file mode 100644
index 0000000000..2732d06e8f
--- /dev/null
+++ b/core/modules/system/tests/modules/js_errors_test/js/js_errors_test.js
@@ -0,0 +1,17 @@
+/**
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
+
+(function (_ref) {
+  var throwError = _ref.throwError,
+      behaviors = _ref.behaviors;
+
+  behaviors.testErrors = {
+    attach: function attach() {
+      throwError(new Error('A manually thrown error.'));
+    }
+  };
+})(Drupal);
\ No newline at end of file
diff --git a/core/modules/system/tests/modules/js_errors_test/js_errors_test.info.yml b/core/modules/system/tests/modules/js_errors_test/js_errors_test.info.yml
new file mode 100644
index 0000000000..bd1c0eef6a
--- /dev/null
+++ b/core/modules/system/tests/modules/js_errors_test/js_errors_test.info.yml
@@ -0,0 +1,6 @@
+name: 'JS Errors test'
+description: 'Provides a Javascript error can be used for tests'
+type: module
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/modules/system/tests/modules/js_errors_test/js_errors_test.libraries.yml b/core/modules/system/tests/modules/js_errors_test/js_errors_test.libraries.yml
new file mode 100644
index 0000000000..3454e7cb63
--- /dev/null
+++ b/core/modules/system/tests/modules/js_errors_test/js_errors_test.libraries.yml
@@ -0,0 +1,6 @@
+errors_test:
+  version: VERSION
+  js:
+    js/js_errors_test.js: {}
+  dependencies:
+    - core/drupal
diff --git a/core/modules/system/tests/modules/js_errors_test/js_errors_test.routing.yml b/core/modules/system/tests/modules/js_errors_test/js_errors_test.routing.yml
new file mode 100644
index 0000000000..d096284e25
--- /dev/null
+++ b/core/modules/system/tests/modules/js_errors_test/js_errors_test.routing.yml
@@ -0,0 +1,7 @@
+js_errors_test.errors:
+  path: '/js_errors_test'
+  defaults:
+    _controller: '\Drupal\js_errors_test\Controller\JsErrorsTestController::jsErrorsTest'
+    _title: 'JsErrorsTest'
+  requirements:
+    _access: 'TRUE'
diff --git a/core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php b/core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php
new file mode 100644
index 0000000000..d850f5662e
--- /dev/null
+++ b/core/modules/system/tests/modules/js_errors_test/src/Controller/JsErrorsTestController.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\js_errors_test\Controller;
+
+/**
+ * Test Controller loading js_errors_test/errors_test library.
+ */
+class JsErrorsTestController {
+
+  /**
+   * Renders page that has js_errors_test/errors_test library attached.
+   *
+   * @return array
+   *   Render array.
+   */
+  public function jsErrorsTest() {
+    return [
+      '#attached' => ['library' => ['js_errors_test/errors_test']],
+    ];
+  }
+
+}
diff --git a/core/modules/system/tests/modules/js_testing_log_test/js/js_testing_log.es6.js b/core/modules/system/tests/modules/js_testing_log_test/js/js_testing_log.es6.js
new file mode 100644
index 0000000000..5ac9c04048
--- /dev/null
+++ b/core/modules/system/tests/modules/js_testing_log_test/js/js_testing_log.es6.js
@@ -0,0 +1,35 @@
+/**
+ * @file
+ *  Testing tools for deprecating JavaScript functions and class properties.
+ */
+(function(Drupal) {
+  if (typeof console !== 'undefined' && console.warn) {
+    const originalWarnFunction = console.warn;
+    console.warn = warning => {
+      const warnings = JSON.parse(
+        sessionStorage.getItem('js_testing_log_test.warnings') ||
+          JSON.stringify([]),
+      );
+      warnings.push(warning);
+      sessionStorage.setItem(
+        'js_testing_log_test.warnings',
+        JSON.stringify(warnings),
+      );
+      originalWarnFunction(warning);
+    };
+
+    const originalThrowFunction = Drupal.throwError;
+    Drupal.throwError = error => {
+      const errors = JSON.parse(
+        sessionStorage.getItem('js_testing_log_test.errors') ||
+        JSON.stringify([]),
+      );
+      errors.push(error.stack);
+      sessionStorage.setItem(
+        'js_testing_log_test.errors',
+        JSON.stringify(errors),
+      );
+      originalThrowFunction(error);
+    };
+  }
+})(Drupal);
diff --git a/core/modules/system/tests/modules/js_testing_log_test/js/js_testing_log.js b/core/modules/system/tests/modules/js_testing_log_test/js/js_testing_log.js
new file mode 100644
index 0000000000..a5b18fdc2a
--- /dev/null
+++ b/core/modules/system/tests/modules/js_testing_log_test/js/js_testing_log.js
@@ -0,0 +1,26 @@
+/**
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
+
+(function (Drupal) {
+  if (typeof console !== 'undefined' && console.warn) {
+    var originalWarnFunction = console.warn;
+    console.warn = function (warning) {
+      var warnings = JSON.parse(sessionStorage.getItem('js_testing_log_test.warnings') || JSON.stringify([]));
+      warnings.push(warning);
+      sessionStorage.setItem('js_testing_log_test.warnings', JSON.stringify(warnings));
+      originalWarnFunction(warning);
+    };
+
+    var originalThrowFunction = Drupal.throwError;
+    Drupal.throwError = function (error) {
+      var errors = JSON.parse(sessionStorage.getItem('js_testing_log_test.errors') || JSON.stringify([]));
+      errors.push(error.stack);
+      sessionStorage.setItem('js_testing_log_test.errors', JSON.stringify(errors));
+      originalThrowFunction(error);
+    };
+  }
+})(Drupal);
\ No newline at end of file
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.info.yml b/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.info.yml
similarity index 100%
rename from core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.info.yml
rename to core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.info.yml
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.libraries.yml b/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.libraries.yml
similarity index 61%
rename from core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.libraries.yml
rename to core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.libraries.yml
index 1744815c98..d02c19893c 100644
--- a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.libraries.yml
+++ b/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.libraries.yml
@@ -1,6 +1,6 @@
 deprecation_log:
   version: VERSION
   js:
-    js/js_deprecation_log.js: { weight: -100 }
+    js/js_testing_log.js: {}
   dependencies:
     - core/drupal
diff --git a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.module b/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.module
similarity index 55%
rename from core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.module
rename to core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.module
index a86a2f21fb..d140ecfdaf 100644
--- a/core/modules/system/tests/modules/js_deprecation_log_test/js_deprecation_log_test.module
+++ b/core/modules/system/tests/modules/js_testing_log_test/js_testing_log_test.module
@@ -8,14 +8,14 @@
 /**
  * Implements hook_page_attachments().
  */
-function js_deprecation_log_test_page_attachments(array &$attachments) {
+function js_testing_log_test_page_attachments(array &$attachments) {
   // Unconditionally attach an asset to the page.
-  $attachments['#attached']['library'][] = 'js_deprecation_log_test/deprecation_log';
+  $attachments['#attached']['library'][] = 'js_testing_log_test/deprecation_log';
 }
 
 /**
  * Implements hook_js_settings_alter().
  */
-function js_deprecation_log_test_js_settings_alter(&$settings) {
+function js_testing_log_test_js_settings_alter(&$settings) {
   $settings['suppressDeprecationErrors'] = FALSE;
 }
diff --git a/core/profiles/nightwatch_testing/nightwatch_testing.info.yml b/core/profiles/nightwatch_testing/nightwatch_testing.info.yml
index b1198093da..1fa0c4941f 100644
--- a/core/profiles/nightwatch_testing/nightwatch_testing.info.yml
+++ b/core/profiles/nightwatch_testing/nightwatch_testing.info.yml
@@ -5,4 +5,4 @@ version: VERSION
 core: 8.x
 hidden: true
 install:
-  - js_deprecation_log_test
+  - js_testing_log_test
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php
new file mode 100644
index 0000000000..6d0d1e89c8
--- /dev/null
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsTest.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Drupal\FunctionalJavascriptTests;
+
+use PHPUnit\Framework\ExpectationFailedException;
+
+/**
+ * Tests that Drupal.throwError will cause tests to fail.
+ *
+ * @group javascript
+ */
+class JavascriptErrorsTest extends WebDriverTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['js_errors_test'];
+
+  /**
+   *
+   */
+  public function testJavascriptErrors() {
+    $this->drupalGet('js_errors_test');
+    // Ensure that errors from previous page loads will be
+    // detected.
+    $this->drupalGet('user');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function tearDown() {
+    try {
+      // Call the parent tearDown() to ensure that an error will found for the
+      // expected Javascript error.
+      parent::tearDown();
+    }
+    catch (ExpectationFailedException $exception) {
+      $this->assertStringStartsWith('Javascript errors found.', $exception->getMessage());
+      $errors = $exception->getComparisonFailure()->getActual();
+      $this->assertCount(1, $errors);
+      $this->assertStringStartsWith('Error: A manually thrown error.', $errors[0]);
+    }
+  }
+
+}
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
index 63ee85c852..86520e70a7 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php
@@ -76,7 +76,7 @@ protected function initMink() {
    * {@inheritdoc}
    */
   protected function installModulesFromClassProperty(ContainerInterface $container) {
-    self::$modules = ['js_deprecation_log_test'];
+    self::$modules = ['js_testing_log_test'];
     if ($this->disableCssAnimations) {
       self::$modules[] = 'css_disable_transitions_test';
     }
@@ -110,12 +110,15 @@ protected function tearDown() {
         throw new \RuntimeException('Unfinished AJAX requests while tearing down a test');
       }
 
-      $warnings = $this->getSession()->evaluateScript("JSON.parse(sessionStorage.getItem('js_deprecation_log_test.warnings') || JSON.stringify([]))");
+      $warnings = $this->getSession()->evaluateScript("JSON.parse(sessionStorage.getItem('js_testing_log_test.warnings') || JSON.stringify([]))");
       foreach ($warnings as $warning) {
         if (strpos($warning, '[Deprecation]') === 0) {
           @trigger_error('Javascript Deprecation:' . substr($warning, 13), E_USER_DEPRECATED);
         }
       }
+      $errors = $this->getSession()->evaluateScript("JSON.parse(sessionStorage.getItem('js_testing_log_test.errors') || JSON.stringify([]))");
+      $this->assertEquals([], $errors,'Javascript errors found.');
+      //trigger_error("Javascript errors, ". implode('::', $errors), E_USER_WARNING);
     }
     parent::tearDown();
   }
diff --git a/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js b/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js
index ca48f071b5..5ba3c3a1ba 100644
--- a/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js
+++ b/core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js
@@ -18,6 +18,6 @@ module.exports.assertion = function(expected) {
   this.command = callback =>
     // eslint-disable-next-line prefer-arrow-callback
     this.api.execute(function() {
-      return window.sessionStorage.getItem('js_deprecation_log_test.warnings');
+      return window.sessionStorage.getItem('js_testing_log_test.warnings');
     }, callback);
 };
diff --git a/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js b/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js
index fa74c7b034..3dd22e6d91 100644
--- a/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js
+++ b/core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js
@@ -18,6 +18,6 @@ module.exports.assertion = function() {
   this.command = callback =>
     // eslint-disable-next-line prefer-arrow-callback
     this.api.execute(function() {
-      return window.sessionStorage.getItem('js_deprecation_log_test.warnings');
+      return window.sessionStorage.getItem('js_testing_log_test.warnings');
     }, callback);
 };
