Related: Tracking Issue: Implement GLFM scripts per the ... (#361241 - closed)
Implements suggestion from !102244 (comment 1150751210) to ensure spec/frontend/content_editor/markdown_snapshot_spec.js
runs when GLFM config files are changed.
See this comment for details of this approach: !102244 (comment 1152326733)
Also adds yml
extension to moduleFileExtensions
in jest.config.base.js
. This is necessary for jest's --findRelatedTests
logic to properly recognize yml
files as dependencies.
This increases the total number of dependencies slightly, but will prevent other occurrences of this same problem happening (imports relying on transform
of yml
files not being detected in dependencies). Here's the diffs in the number of entries in the HasteFS
entry Jest uses to represent the list of dependencies:
117979 with yml
113271 without yml
Note that with the completion of Run jest full jobs in merge request pipelines a... (#379174 - closed), it will be less likely that missing running a jest spec results in a broken master.
However, this MR will help make sure that developers get earlier warning of failures rather than only finding out once the MR is approved and ready for merge, thus triggering a full jest run.
See the GLFM Specification Guide development documentation for much more context on all of this work: https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide
yarn jest spec/frontend --findRelatedTests glfm_specification/input/gitlab_flavored_markdown/glfm_example_status.yml --passWithNoTests
, to ensure the moduleFileExtensions
change works. Otherwise it relies on existing logic for the jest minimal CI job.This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.