File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,42 @@ import { InstanceFixture } from "./models/InstanceFixture";
5
5
6
6
describe ( "action-helper" , ( ) => {
7
7
describe ( "createMessage" , ( ) => {
8
+ it ( "returns the snapshot message" , ( ) => {
9
+ expect (
10
+ createMessage (
11
+ [
12
+ {
13
+ "@name" : "http://localhost:8080" ,
14
+ alerts : [
15
+ {
16
+ name : "Cross Site Scripting (Reflected)" ,
17
+ pluginid : "40012" ,
18
+ riskcode : "2" ,
19
+ confidence : "3" ,
20
+ instances : [
21
+ { uri : "http://localhost:8080/bodgeit/contact.jsp" } ,
22
+ ] ,
23
+ } ,
24
+ ] ,
25
+ } ,
26
+ ] ,
27
+
28
+ "2343454356" ,
29
+ "https://github.com/zaproxy/actions-common/actions/runs/4926339347"
30
+ )
31
+ ) . toMatchInlineSnapshot ( `
32
+ "- Site: [http://localhost:8080](http://localhost:8080)
33
+ **New Alerts**
34
+ - **Medium risk (Confidence: High): Cross Site Scripting (Reflected)** [[40012]](https://www.zaproxy.org/docs/alerts/40012) total: 1:
35
+ - [http://localhost:8080/bodgeit/contact.jsp](http://localhost:8080/bodgeit/contact.jsp)
36
+
37
+
38
+
39
+ https://github.com/zaproxy/actions-common/actions/runs/4926339347
40
+ 2343454356"
41
+ ` ) ;
42
+ } ) ;
43
+
8
44
it ( "returns the count of instances for an alert" , ( ) => {
9
45
expect (
10
46
createMessage (
You can’t perform that action at this time.
0 commit comments