Skip to content

Commit 0e76347

Browse files
authored
Merge pull request #553 from AikidoSec/assertion
Assert correct error object
2 parents 896a9bc + 0706e96 commit 0e76347

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/sinks/Function.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ t.test("it detects JS injections using Function", async (t) => {
102102
"const x = a + b + c + 1 + 1; console.log('hello'); return x;"
103103
)(2, 6)
104104
);
105-
t.ok(error2 instanceof Error);
106-
if (error2 instanceof Error) {
105+
t.ok(error3 instanceof Error);
106+
if (error3 instanceof Error) {
107107
t.same(
108-
error2.message,
108+
error3.message,
109109
"Zen has blocked a JavaScript injection: new Function(...) originating from body.calc"
110110
);
111111
}

0 commit comments

Comments
 (0)