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/frontend/helpers/wait_for_attribute_change.js')
-rw-r--r--spec/frontend/helpers/wait_for_attribute_change.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/spec/frontend/helpers/wait_for_attribute_change.js b/spec/frontend/helpers/wait_for_attribute_change.js
deleted file mode 100644
index 8f22d569222..00000000000
--- a/spec/frontend/helpers/wait_for_attribute_change.js
+++ /dev/null
@@ -1,16 +0,0 @@
-export default (domElement, attributes, timeout = 1500) =>
- new Promise((resolve, reject) => {
- let observer;
- const timeoutId = setTimeout(() => {
- observer.disconnect();
- reject(new Error(`Could not see an attribute update within ${timeout} ms`));
- }, timeout);
-
- observer = new MutationObserver(() => {
- clearTimeout(timeoutId);
- observer.disconnect();
- resolve();
- });
-
- observer.observe(domElement, { attributes: true, attributeFilter: attributes });
- });