Include async/await function in custom rules test for asynchronous mode.

This commit is contained in:
David Anson 2021-12-27 18:25:18 -08:00
parent 11e9a20531
commit e298e3daa4

View file

@ -1198,16 +1198,15 @@ test("customRulesAsyncReadFiles", (t) => {
"tags": [ "tag" ], "tags": [ "tag" ],
"asynchronous": true, "asynchronous": true,
"function": "function":
(params, onError) => fs.readFile(__filename, "utf8").then( async(params, onError) => {
(content) => { const content = await fs.readFile(__filename, "utf8");
t.true(content.length > 0); t.true(content.length > 0);
onError({ onError({
"lineNumber": 1, "lineNumber": 1,
"detail": "detail2", "detail": "detail2",
"context": "context2" "context": "context2"
}); });
} }
)
} }
], ],
"strings": { "strings": {