Skip to content

Commit 4fa4423

Browse files
committed
test: for ignore, issue #21
1 parent 433d79c commit 4fa4423

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

test/fixtures/ignore.expected.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!doctype html>
2+
<html>
3+
<body>
4+
<img class="ignore-class" srcset="photo-lg.jpg 1000w, photo-md.jpg 500w, photo-sm.jpg 250w" src="photo.png">
5+
</body>
6+
</html>

test/fixtures/ignore.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!doctype html>
2+
<html>
3+
<body>
4+
<img class="ignore-class" srcset="photo-lg.jpg 1000w, photo-md.jpg 500w, photo-sm.jpg 250w" src="photo.png">
5+
</body>
6+
</html>

test/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ test('Multi srcset', (t) => {
3333
})
3434
})
3535

36+
test('Class ignore', (t) => {
37+
return compare(t, 'ignore', {
38+
classIgnore: ['ignore-class']
39+
})
40+
})
41+
3642
function compare (t, name, options) {
3743
const html = readFileSync(path.join(fixtures, `${name}.html`), 'utf8')
3844
const expected = readFileSync(path.join(fixtures, `${name}.expected.html`), 'utf8')

0 commit comments

Comments
 (0)