Skip to content

Commit

Permalink
Include async/await function in custom rules test for asynchronous mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Dec 28, 2021
1 parent 11e9a20 commit e298e3d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions test/markdownlint-test-custom-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit e298e3d

Please sign in to comment.