Harden code to snapshot rule definitions against mutation, add comments to some helper functions.

This commit is contained in:
David Anson 2023-07-12 21:58:36 -07:00
parent 8fe7c109ed
commit 9897863130
4 changed files with 154 additions and 36 deletions

View file

@ -490,9 +490,9 @@ test("customRulesDefinitionStatic", (t) => new Promise((resolve) => {
"tags": [ "tag" ],
"function": (params, onError) => {
const definition = options.customRules[0];
definition.names = [ "changed" ];
definition.names[0] = "changed";
definition.description = "changed";
definition.information = new URL("https://example.com/changed");
definition.information.pathname = "changed";
onError({
"lineNumber": 1
});