mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Add test to ensure params.tokens and params.parsers.markdownit are the same object.
This commit is contained in:
parent
c53df8b720
commit
80235711f4
1 changed files with 19 additions and 0 deletions
|
|
@ -1200,6 +1200,25 @@ test("customRulesAsyncThrowsInSyncContext", (t) => {
|
|||
);
|
||||
});
|
||||
|
||||
test("customRulesParamsTokensSameObject", (t) => {
|
||||
t.plan(1);
|
||||
const options = {
|
||||
"customRules": [
|
||||
{
|
||||
"names": [ "name" ],
|
||||
"description": "description",
|
||||
"tags": [ "tag" ],
|
||||
"function":
|
||||
(params) => {
|
||||
t.is(params.tokens, params.parsers.markdownit);
|
||||
}
|
||||
}
|
||||
],
|
||||
"files": [ "README.md" ]
|
||||
};
|
||||
return markdownlint.promises.markdownlint(options).then(() => null);
|
||||
});
|
||||
|
||||
test("customRulesParamsAreFrozen", (t) => {
|
||||
const options = {
|
||||
"customRules": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue