diff --git a/scripts/setup/generate-as-if-foss-env.rb b/scripts/setup/generate-as-if-foss-env.rb
index 35fc4dfe4498b71e7107ae175e4ecbbb1931f585..e0a3dbddd74a9af18b68c2203a399fb0b033c515 100755
--- a/scripts/setup/generate-as-if-foss-env.rb
+++ b/scripts/setup/generate-as-if-foss-env.rb
@@ -15,8 +15,6 @@ class GenerateAsIfFossEnv
     eslint
     generate-apollo-graphql-schema
     graphql-schema-dump
-    jest
-    jest-integration
     qa:internal
     qa:selectors
     static-analysis
@@ -76,7 +74,13 @@ def detect_rspec(job)
   end
 
   def detect_other_jobs(job)
-    other_jobs << job.name if FOSS_JOBS.member?(job.name)
+    if FOSS_JOBS.member?(job.name)
+      other_jobs << job.name
+    else
+      jest_type = job.name[%r{^(jest(?:-\w+)?)(?: \d+/\d+)?$}, 1]
+
+      other_jobs << jest_type if jest_type
+    end
   end
 
   def rspec_variables
diff --git a/spec/scripts/setup/generate_as_if_foss_env_spec.rb b/spec/scripts/setup/generate_as_if_foss_env_spec.rb
index 2b94ce5bb0c9e3a03695ffbb3d1e64572273b390..bafe306bbe5bf1c786a6a434f228299e98b01dce 100644
--- a/spec/scripts/setup/generate_as_if_foss_env_spec.rb
+++ b/spec/scripts/setup/generate_as_if_foss_env_spec.rb
@@ -39,7 +39,7 @@
         'eslint',
         'generate-apollo-graphql-schema',
         'graphql-schema-dump',
-        'jest',
+        'jest 1/5',
         'jest-integration',
         'qa:internal',
         'qa:selectors',