-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(_buildSrcSet): add e2e test and remove skipped mocks
This commit adds an e2e test for buildSrcSet advanced ussage that ensures absolute URLs are parsed correctly for srcset generation. It also removed skipped mocked tests for the static method. Co-authored-by: Sherwin Heydarbeygi <sherwin@imgix.com>
- Loading branch information
Showing
6 changed files
with
60 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<img | ||
:src="advancedSrc" | ||
:srcset="advancedSrcSet" | ||
data-testid="static-build-src-set" | ||
/> | ||
</template> | ||
|
||
<script> | ||
import { buildUrl, buildSrcSet } from '@/plugins/vue-imgix'; | ||
// NB: Make sure initVueImgix has been called before this code runs | ||
export default { | ||
name: 'static-build-src-set', | ||
computed: { | ||
advancedSrc: () => | ||
buildUrl('https://sdk-test.imgix.net/amsterdam.jpg', { | ||
auto: 'format', | ||
}), | ||
advancedSrcSet: () => | ||
buildSrcSet('https://sdk-test.imgix.net/amsterdam.jpg', { | ||
auto: 'format', | ||
}), | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters