diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb
index <HASH>..<HASH> 100644
--- a/railties/test/isolation/abstract_unit.rb
+++ b/railties/test/isolation/abstract_unit.rb
@@ -541,6 +541,7 @@ Module.new do
   FileUtils.cp_r("#{assets_path}/config/webpack", "#{app_template_path}/config/webpack")
   FileUtils.ln_s("#{assets_path}/node_modules", "#{app_template_path}/node_modules")
   FileUtils.chdir(app_template_path) do
+    sh "yarn install"
     sh "bin/rails webpacker:binstubs"
   end
Run yarn install in template dir

We want to yarn install in the template dir so that templates get a
yarn.lock copied over.