Skip to content

Commit 615c5dd

Browse files
committed
Turn Vite autoBuild off for tests
1 parent 3e0275a commit 615c5dd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

config/vite.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"port": 3036
1010
},
1111
"test": {
12-
"autoBuild": true,
12+
"autoBuild": false,
1313
"publicOutputDir": "vite-test",
1414
"port": 3037
1515
}

spec/rails_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
require "capybara/rspec"
1010
require "selenium-webdriver"
1111

12+
# Precompile Vite assets once before running the test suite
13+
ViteRuby.commands.build
14+
1215
# Rails.root.glob('spec/support/**/*.rb').sort_by(&:to_s).each { |f| require f }
1316

1417
begin

0 commit comments

Comments
 (0)