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/support/helpers/javascript_fixtures_helpers.rb')
-rw-r--r--spec/support/helpers/javascript_fixtures_helpers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/helpers/javascript_fixtures_helpers.rb b/spec/support/helpers/javascript_fixtures_helpers.rb
index fb909008f12..84cd0181533 100644
--- a/spec/support/helpers/javascript_fixtures_helpers.rb
+++ b/spec/support/helpers/javascript_fixtures_helpers.rb
@@ -13,6 +13,12 @@ module JavaScriptFixturesHelpers
included do |base|
base.around do |example|
+ # Don't actually run the example when we're only interested in the `test file -> JSON frontend fixture` mapping
+ if ENV['GENERATE_FRONTEND_FIXTURES_MAPPING'] == 'true'
+ $fixtures_mapping[example.metadata[:file_path].delete_prefix('./')] << File.join(fixture_root_path, example.description) # rubocop:disable Style/GlobalVars
+ next
+ end
+
# pick an arbitrary date from the past, so tests are not time dependent
# Also see spec/frontend/__helpers__/fake_date/jest.js
Timecop.freeze(Time.utc(2015, 7, 3, 10)) { example.run }