fix the format and use window.location
This commit is contained in:
@@ -48,8 +48,14 @@ describe('absolute url to stylesheet', () => {
|
||||
});
|
||||
|
||||
it('can handle multiple no quote paths', () => {
|
||||
expect(absoluteToStylesheet('background-image: url(images/b.jpg); background: #aabbcc url(images/a.jpg) 50% 50% repeat;', href)).to.equal(
|
||||
`background-image: url('http://localhost/css/images/b.jpg'); background: #aabbcc url('http://localhost/css/images/a.jpg') 50% 50% repeat;`,
|
||||
expect(
|
||||
absoluteToStylesheet(
|
||||
'background-image: url(images/b.jpg); background: #aabbcc url(images/a.jpg) 50% 50% repeat;',
|
||||
href,
|
||||
),
|
||||
).to.equal(
|
||||
`background-image: url('http://localhost/css/images/b.jpg');` +
|
||||
`background: #aabbcc url('http://localhost/css/images/a.jpg') 50% 50% repeat;`,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user