-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of components being on separate lines
Fixes #14
- Loading branch information
1 parent
0518f4f
commit 08f8154
Showing
2 changed files
with
14 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -56,6 +56,16 @@ test('parseSrcset() - strict mode', t => { | |
); | ||
}); | ||
|
||
test('parseSrcset() - should correctly parse srcset with varied spacing and newlines', t => { | ||
const fixture = `image.png, | ||
[email protected] 2x`; | ||
|
||
t.deepEqual(parseSrcset(fixture), [ | ||
{url: 'image.png'}, | ||
{url: '[email protected]', density: 2}, | ||
]); | ||
}); | ||
|
||
test('stringifySrcset() should stringify srcset', t => { | ||
const fixture = [ | ||
{url: 'banner-HD.jpeg', density: 2}, | ||
|