diff --git a/core/tests/Drupal/Tests/ComposerIntegrationTest.php b/core/tests/Drupal/Tests/ComposerIntegrationTest.php
index e24195b..77b00ac 100644
--- a/core/tests/Drupal/Tests/ComposerIntegrationTest.php
+++ b/core/tests/Drupal/Tests/ComposerIntegrationTest.php
@@ -47,7 +47,6 @@ protected function getErrorMessages() {
    */
   protected function getPaths() {
     return [
-      $this->root,
       $this->root . '/core',
       $this->root . '/core/lib/Drupal/Component/Gettext',
       $this->root . '/core/lib/Drupal/Component/Plugin',
@@ -60,15 +59,29 @@ protected function getPaths() {
    * Tests composer.json.
    */
   public function testComposerJson() {
-    foreach ($this->getPaths() as $path) {
-      $json = file_get_contents($path . '/composer.json');
+    // Validate root composer.json. The file may not exist in Drupal projects
+    // managed with composer.
+    if (file_exists($this->root . '/composer.json')) {
+      $this->validateComposerJson($this->root . '/composer.json');
+    }
 
-      $result = json_decode($json);
-      $this->assertNotNull($result, $this->getErrorMessages()[json_last_error()]);
+    foreach ($this->getPaths() as $path) {
+      $this->validateComposerJson($path . '/composer.json');
     }
   }
 
   /**
+   * Check composer.json for syntax errors.
+   *
+   * @param $path
+   */
+  protected function validateComposerJson($path) {
+    $json = file_get_contents($path);
+    $result = json_decode($json);
+    $this->assertNotNull($result, $this->getErrorMessages()[json_last_error()]);
+  }
+
+  /**
    * Tests core's composer.json replace section.
    *
    * Verify that all core modules are also listed in the 'replace' section of
