Skip to content

Commit 7d77c7a

Browse files
committed
test: remove unused class/id/attrs, issue #44 #34
1 parent 3b997fd commit 7d77c7a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/plugin.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,3 +772,17 @@ test('Custom attribute names that will be involved in the process #36', t => {
772772
t.is(result.html, expected);
773773
});
774774
});
775+
776+
test('Dont remove classes that are not in our CSS', async t => {
777+
const html = `
778+
<div id="foo" class="bar">baz</div>
779+
`;
780+
781+
const expected = `
782+
<div id="foo" class="bar">baz</div>
783+
`;
784+
785+
const result = await posthtml().use(plugin({removeUnfound: false})).process(html);
786+
787+
t.is(result.html, expected);
788+
});

0 commit comments

Comments
 (0)