Installing with Composer causes unit tests to fail
Drupal with Composer uses the drupal-scaffold script which you mentioned. It seems that it does not include the composer.json and composer.lock files by default. 

But the files are there: http://cgit.drupalcode.org/drupal/plain/

Looking at the plugin documentation on github in the Configuration section reveals that the composer.json and composer.lock files are not on the list to be included by default. 

But the plugin is configurable, and you can actually specify the name of the files that should be additionally included.

So adding this in the extra section of your composer.json:

"drupal-scaffold" : {
    "includes" : [
        "composer.json",
        "composer.lock"
    ]
}


followed by running composer drupal-scaffold OR removing web/core directory and running composer install should get you the required files and make the tests pass.x