diff --git a/test/markdownlint-test-micromark.mjs b/test/markdownlint-test-micromark.mjs index ca78f293..011c34da 100644 --- a/test/markdownlint-test-micromark.mjs +++ b/test/markdownlint-test-micromark.mjs @@ -45,3 +45,12 @@ test("filterByTypes", async(t) => { t.true(token.type.endsWith("Text")); } }); + +test("filterByPredicate/filterByTypes", async(t) => { + t.plan(1); + const tokens = await testTokens; + const byPredicate = filterByPredicate(tokens, () => true); + const allTypes = new Set(byPredicate.map(((token) => token.type))); + const byTypes = filterByTypes(tokens, [ ...allTypes.values() ]); + t.deepEqual(byPredicate, byTypes); +});