Added srcset support (#18)
* added src set as a parsed attribute * added tests * changed to /a * added multiple attribute handling * added better comment * made snapshot ignore invalid input as if it is invalid input in the original DOM, it should stay invalid in the recreated DOM * added extra absolute test case * code style * addressed comments
This commit is contained in:
@@ -5,7 +5,7 @@ import { absoluteToStylesheet } from '../src/snapshot';
|
||||
describe('absolute url to stylesheet', () => {
|
||||
const href = 'http://localhost/css/style.css';
|
||||
|
||||
it('cam handle relative path', () => {
|
||||
it('can handle relative path', () => {
|
||||
expect(absoluteToStylesheet('url(a.jpg)', href)).to.equal(
|
||||
`url('http://localhost/css/a.jpg')`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user