function JavascriptErrorsSuppressionTest::testJavascriptErrors
Same name in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php \Drupal\FunctionalJavascriptTests\JavascriptErrorsSuppressionTest::testJavascriptErrors()
- 11.x core/tests/Drupal/FunctionalJavascriptTests/JavascriptErrorsSuppressionTest.php \Drupal\FunctionalJavascriptTests\JavascriptErrorsSuppressionTest::testJavascriptErrors()
Tests that JavaScript console errors can be suppressed.
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ JavascriptErrorsSuppressionTest.php, line 32
Class
- JavascriptErrorsSuppressionTest
- Tests that Drupal.throwError can be suppressed to allow a test to pass.
Namespace
Drupal\FunctionalJavascriptTestsCode
public function testJavascriptErrors() : void {
// Visit page that will throw a JavaScript console error.
$this->drupalGet('js_errors_test');
// Ensure that errors from previous page loads will be
// detected.
$this->drupalGet('user');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.