mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Include async/await function in custom rules test for asynchronous mode.
This commit is contained in:
parent
11e9a20531
commit
e298e3daa4
1 changed files with 9 additions and 10 deletions
|
@ -1198,16 +1198,15 @@ test("customRulesAsyncReadFiles", (t) => {
|
|||
"tags": [ "tag" ],
|
||||
"asynchronous": true,
|
||||
"function":
|
||||
(params, onError) => fs.readFile(__filename, "utf8").then(
|
||||
(content) => {
|
||||
t.true(content.length > 0);
|
||||
onError({
|
||||
"lineNumber": 1,
|
||||
"detail": "detail2",
|
||||
"context": "context2"
|
||||
});
|
||||
}
|
||||
)
|
||||
async(params, onError) => {
|
||||
const content = await fs.readFile(__filename, "utf8");
|
||||
t.true(content.length > 0);
|
||||
onError({
|
||||
"lineNumber": 1,
|
||||
"detail": "detail2",
|
||||
"context": "context2"
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
"strings": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue