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,8 +1198,8 @@ 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,
@ -1207,7 +1207,6 @@ test("customRulesAsyncReadFiles", (t) => {
"context": "context2" "context": "context2"
}); });
} }
)
} }
], ],
"strings": { "strings": {