Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/webpack_helper_spec.rb')
-rw-r--r--spec/helpers/webpack_helper_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/helpers/webpack_helper_spec.rb b/spec/helpers/webpack_helper_spec.rb
index f9e2d265153..23585c47239 100644
--- a/spec/helpers/webpack_helper_spec.rb
+++ b/spec/helpers/webpack_helper_spec.rb
@@ -34,4 +34,22 @@ RSpec.describe WebpackHelper do
expect(output).to eq("<link rel=\"prefetch\" href=\"#{asset_path}\">")
end
end
+
+ context 'when vite enabled' do
+ let(:bundle) { 'bundle.js' }
+
+ before do
+ stub_rails_env('development')
+ stub_feature_flags(vite: true)
+
+ allow(helper).to receive(:vite_javascript_tag).and_return('vite')
+ allow(helper).to receive(:vite_running).and_return(true)
+ end
+
+ describe '#webpack_bundle_tag' do
+ it 'return vite javascript tag' do
+ expect(helper.webpack_bundle_tag(bundle)).to eq('vite')
+ end
+ end
+ end
end