1
1
/*
2
- * Copyright (c) 2016-2024 Bjoern Kimminich & the OWASP Juice Shop contributors.
2
+ * Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
3
3
* SPDX-License-Identifier: MIT
4
4
*/
5
5
@@ -49,10 +49,10 @@ describe('Generated CTFd data', () => {
49
49
challenges . c3 . hint = 'hint'
50
50
return Promise . all ( [
51
51
expect ( generateData ( challenges , { insertHints : options . freeTextHints , insertHintUrls : options . noHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
52
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hint"' , type_data : '' }
52
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hint"",""cost"":0}] "' , type_data : '' }
53
53
) ,
54
54
expect ( generateData ( challenges , { insertHints : options . paidTextHints , insertHintUrls : options . noHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
55
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hint"' , type_data : '' }
55
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hint"",""cost"":45}] "' , type_data : '' }
56
56
)
57
57
] )
58
58
} )
@@ -61,10 +61,10 @@ describe('Generated CTFd data', () => {
61
61
challenges . c3 . hintUrl = 'hintUrl'
62
62
return Promise . all ( [
63
63
expect ( generateData ( challenges , { insertHints : options . noTextHints , insertHintUrls : options . freeHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
64
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hintUrl"' , type_data : '' }
64
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hintUrl"",""cost"":0}] "' , type_data : '' }
65
65
) ,
66
66
expect ( generateData ( challenges , { insertHints : options . noTextHints , insertHintUrls : options . paidHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
67
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hintUrl"' , type_data : '' }
67
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , category : '2' , value : 450 , type : 'standard' , state : 'visible' , max_attempts : 0 , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hintUrl"",""cost"":90}] "' , type_data : '' }
68
68
)
69
69
] )
70
70
} )
@@ -74,16 +74,16 @@ describe('Generated CTFd data', () => {
74
74
challenges . c3 . hintUrl = 'hintUrl'
75
75
return Promise . all ( [
76
76
expect ( generateData ( challenges , { insertHints : options . freeTextHints , insertHintUrls : options . freeHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
77
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hint, hintUrl"' }
77
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hint"",""cost"":0},{""content"":"" hintUrl"",""cost"":0}] "' }
78
78
) ,
79
79
expect ( generateData ( challenges , { insertHints : options . paidTextHints , insertHintUrls : options . freeHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
80
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hint, hintUrl"' }
80
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hint"",""cost"":45},{""content"":"" hintUrl"",""cost"":0}] "' }
81
81
) ,
82
82
expect ( generateData ( challenges , { insertHints : options . freeTextHints , insertHintUrls : options . paidHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
83
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hint, hintUrl"' }
83
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hint"",""cost"":0},{""content"":"" hintUrl"",""cost"":90}] "' }
84
84
) ,
85
85
expect ( generateData ( challenges , { insertHints : options . paidTextHints , insertHintUrls : options . paidHintUrls , ctfKey : '' , vulnSnippets : { } } ) ) . to . eventually . deep . include (
86
- { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"hint, hintUrl"' }
86
+ { name : 'c3' , description : '"C3 (Difficulty Level: 3)"' , value : 450 , category : '2' , state : 'visible' , max_attempts : 0 , type : 'standard' , type_data : '' , flags : 'aae3acb6eff2000c0e12af0d0d875d0bdbf4ca81' , tags : '"foo"' , hints : '"[{""content"":"" hint"",""cost"":45},{""content"":"" hintUrl"",""cost"":90}] "' }
87
87
)
88
88
] )
89
89
} )
0 commit comments