Skip to content

Commit a2c512e

Browse files
author
Simone Sestito
committed
test: replaceExtension feature unspecified
1 parent 851a714 commit a2c512e

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
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+
<picture><source type="image/webp" srcset="photo.png.webp"><img src="photo.png"></picture>
5+
</body>
6+
</html>

test/fixtures/no-extension.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 src="photo.png">
5+
</body>
6+
</html>

test/test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ test('Append extension', (t) => {
2323
})
2424
})
2525

26+
test('Default behaviour', (t) => {
27+
return compare(t, 'no-extension')
28+
})
29+
2630
function compare (t, name, options) {
2731
const html = readFileSync(path.join(fixtures, `${name}.html`), 'utf8')
2832
const expected = readFileSync(path.join(fixtures, `${name}.expected.html`), 'utf8')

0 commit comments

Comments
 (0)