diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-17 18:08:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-17 18:08:29 +0300 |
commit | 6c26db46b89172c15ae7b27d938db643721d59cb (patch) | |
tree | ac2f4401213bba4220e205798396f3442a21f4cd /spec/frontend/lazy_loader_spec.js | |
parent | 6b97ea1f8008a7ddb22b1faa03496cf46c546c05 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lazy_loader_spec.js')
-rw-r--r-- | spec/frontend/lazy_loader_spec.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/frontend/lazy_loader_spec.js b/spec/frontend/lazy_loader_spec.js index 3d8b0d9c307..e0b6c7119f9 100644 --- a/spec/frontend/lazy_loader_spec.js +++ b/spec/frontend/lazy_loader_spec.js @@ -27,7 +27,7 @@ describe('LazyLoader', () => { const createLazyLoadImage = () => { const newImg = document.createElement('img'); newImg.className = 'lazy'; - newImg.setAttribute('data-src', TEST_PATH); + newImg.dataset.src = TEST_PATH; document.body.appendChild(newImg); triggerChildMutation(); @@ -108,7 +108,7 @@ describe('LazyLoader', () => { expect(LazyLoader.loadImage).toHaveBeenCalledWith(img); expect(img.getAttribute('src')).toBe(TEST_PATH); - expect(img.getAttribute('data-src')).toBe(null); + expect(img.dataset.src).toBeUndefined(); expect(img).toHaveClass('js-lazy-loaded'); }); |