Move createObjectURL to a dom_shims
Goal
Dom shims are way for use to add more properties to the mock DOM in jest environments: https://gitlab.com/gitlab-org/gitlab/blob/aae7c654cdbf7db042b8454e241b07fda45257b3/spec/frontend/helpers/dom_shims/index.js#L1
Currently createObjectURL
is not yet available, so it must be mocked in every test.
Why work on this?
This can reduce the amount of work on writing components that use createObjectURL
, such as panel-type
. The end goal is to create tests faster.
Original Discussion
The following discussion from !28180 (merged) should be addressed:
-
@pslaughter started a discussion: nitpick (non-blocking): This is probably something we should move to a
dom_shim
. We can handle this in a follow up if you'd like😄
Edited by Miguel Rincon