Skip to content

Fix slowness of CopyAsGFM.pasteGFM spec

What does this MR do and why?

The spec apparently goes down a code path which does loads of async imports which slow down one particular spec. If we call the same APIs once in a beforeAll, it will move that overhead outside of the it and make the individual spec faster again.

  • CopyAsGFM.pasteGFM does not allow xss in x-gfm-html

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. yarn run jest --watch spec/frontend/behaviors/copy_as_gfm_spec.js --ci --no-cache on master / here. The spec should report a few hundred milliseconds before and just a few after.
Edited by Lukas 'ai-pi' Eipert

Merge request reports