Skip to content

Commit 75e8f3c

Browse files
committed
tests: Don't set default parameters in test helper
1 parent d7241c5 commit 75e8f3c

File tree

5 files changed

+156
-46
lines changed

5 files changed

+156
-46
lines changed

tests/bug-detectors/command-injection.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe("Command injection", () => {
2929

3030
it("exec with EVIL command", () => {
3131
const fuzzTest = new FuzzTestBuilder()
32+
.runs(0)
3233
.sync(false)
3334
.fuzzEntryPoint("execEVIL")
3435
.dir(bugDetectorDirectory)
@@ -41,6 +42,7 @@ describe("Command injection", () => {
4142

4243
it("exec with FRIENDLY command", () => {
4344
const fuzzTest = new FuzzTestBuilder()
45+
.runs(0)
4446
.sync(false)
4547
.fuzzEntryPoint("execFRIENDLY")
4648
.dir(bugDetectorDirectory)
@@ -51,6 +53,7 @@ describe("Command injection", () => {
5153

5254
it("execFile with EVIL file", () => {
5355
const fuzzTest = new FuzzTestBuilder()
56+
.runs(0)
5457
.sync(false)
5558
.fuzzEntryPoint("execFileEVIL")
5659
.dir(bugDetectorDirectory)
@@ -63,6 +66,7 @@ describe("Command injection", () => {
6366

6467
it("execFile with FRIENDLY file", () => {
6568
const fuzzTest = new FuzzTestBuilder()
69+
.runs(0)
6670
.sync(false)
6771
.fuzzEntryPoint("execFileFRIENDLY")
6872
.dir(bugDetectorDirectory)
@@ -73,6 +77,7 @@ describe("Command injection", () => {
7377

7478
it("execFileSync with EVIL file", () => {
7579
const fuzzTest = new FuzzTestBuilder()
80+
.runs(0)
7681
.sync(false)
7782
.fuzzEntryPoint("execFileSyncEVIL")
7883
.dir(bugDetectorDirectory)
@@ -85,6 +90,7 @@ describe("Command injection", () => {
8590

8691
it("execFileSync with FRIENDLY file", () => {
8792
const fuzzTest = new FuzzTestBuilder()
93+
.runs(0)
8894
.sync(false)
8995
.fuzzEntryPoint("execFileSyncFRIENDLY")
9096
.dir(bugDetectorDirectory)
@@ -95,6 +101,7 @@ describe("Command injection", () => {
95101

96102
it("spawn with EVIL command", () => {
97103
const fuzzTest = new FuzzTestBuilder()
104+
.runs(0)
98105
.sync(false)
99106
.fuzzEntryPoint("spawnEVIL")
100107
.dir(bugDetectorDirectory)
@@ -107,6 +114,7 @@ describe("Command injection", () => {
107114

108115
it("spawn with FRIENDLY command", () => {
109116
const fuzzTest = new FuzzTestBuilder()
117+
.runs(0)
110118
.sync(false)
111119
.fuzzEntryPoint("spawnFRIENDLY")
112120
.dir(bugDetectorDirectory)
@@ -117,6 +125,7 @@ describe("Command injection", () => {
117125

118126
it("spawnSync with EVIL command", () => {
119127
const fuzzTest = new FuzzTestBuilder()
128+
.runs(0)
120129
.sync(false)
121130
.fuzzEntryPoint("spawnSyncEVIL")
122131
.dir(bugDetectorDirectory)
@@ -129,6 +138,7 @@ describe("Command injection", () => {
129138

130139
it("spawnSync with FRIENDLY command", () => {
131140
const fuzzTest = new FuzzTestBuilder()
141+
.runs(0)
132142
.sync(false)
133143
.fuzzEntryPoint("spawnSyncFRIENDLY")
134144
.dir(bugDetectorDirectory)
@@ -139,6 +149,7 @@ describe("Command injection", () => {
139149

140150
it("fork with EVIL command", () => {
141151
const fuzzTest = new FuzzTestBuilder()
152+
.runs(0)
142153
.sync(false)
143154
.fuzzEntryPoint("forkEVIL")
144155
.dir(bugDetectorDirectory)
@@ -151,6 +162,7 @@ describe("Command injection", () => {
151162

152163
it("fork with FRIENDLY command", () => {
153164
const fuzzTest = new FuzzTestBuilder()
165+
.runs(0)
154166
.sync(false)
155167
.fuzzEntryPoint("forkFRIENDLY")
156168
.dir(bugDetectorDirectory)

tests/bug-detectors/general.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ describe("General tests", () => {
5656

5757
it("Call with EVIL string; SYNC", () => {
5858
const fuzzTest = new FuzzTestBuilder()
59+
.runs(0)
5960
.sync(true)
6061
.fuzzEntryPoint("CallOriginalEvilSync")
6162
.dir(bugDetectorDirectory)
@@ -69,6 +70,7 @@ describe("General tests", () => {
6970

7071
it("Call with FRIENDLY string; ASYNC", () => {
7172
const fuzzTest = new FuzzTestBuilder()
73+
.runs(0)
7274
.sync(false)
7375
.fuzzEntryPoint("CallOriginalFriendlyAsync")
7476
.dir(bugDetectorDirectory)
@@ -79,6 +81,7 @@ describe("General tests", () => {
7981

8082
it("Call with FRIENDLY string; SYNC", () => {
8183
const fuzzTest = new FuzzTestBuilder()
84+
.runs(0)
8285
.sync(true)
8386
.fuzzEntryPoint("CallOriginalFriendlySync")
8487
.dir(bugDetectorDirectory)
@@ -89,6 +92,7 @@ describe("General tests", () => {
8992

9093
it("Call with EVIL string; With done callback", () => {
9194
const fuzzTest = new FuzzTestBuilder()
95+
.runs(0)
9296
.sync(false)
9397
.fuzzEntryPoint("CallOriginalEvilDoneCallback")
9498
.dir(bugDetectorDirectory)
@@ -102,6 +106,7 @@ describe("General tests", () => {
102106

103107
it("Call with EVIL string; With done callback; With try/catch", () => {
104108
const fuzzTest = new FuzzTestBuilder()
109+
.runs(0)
105110
.sync(false)
106111
.fuzzEntryPoint("CallOriginalEvilDoneCallbackWithTryCatch")
107112
.dir(bugDetectorDirectory)
@@ -115,6 +120,7 @@ describe("General tests", () => {
115120

116121
it("Call with EVIL string; With done callback; With timeout", () => {
117122
const fuzzTest = new FuzzTestBuilder()
123+
.runs(0)
118124
.sync(false)
119125
.fuzzEntryPoint("CallOriginalEvilDoneCallbackWithTimeout")
120126
.dir(bugDetectorDirectory)
@@ -129,6 +135,7 @@ describe("General tests", () => {
129135

130136
it("Call with EVIL string; With done callback; With timeout; With try/catch", () => {
131137
const fuzzTest = new FuzzTestBuilder()
138+
.runs(0)
132139
.sync(false)
133140
.fuzzEntryPoint("CallOriginalEvilDoneCallbackWithTimeoutWithTryCatch")
134141
.dir(bugDetectorDirectory)
@@ -141,6 +148,7 @@ describe("General tests", () => {
141148

142149
it("Call with FRIENDLY string; With done callback", () => {
143150
const fuzzTest = new FuzzTestBuilder()
151+
.runs(0)
144152
.sync(false)
145153
.fuzzEntryPoint("CallOriginalFriendlyDoneCallback")
146154
.dir(bugDetectorDirectory)
@@ -227,6 +235,7 @@ describe("General tests", () => {
227235

228236
it("Disable all bug detectors; Call with evil", () => {
229237
const fuzzTest = new FuzzTestBuilder()
238+
.runs(0)
230239
.sync(false)
231240
.fuzzEntryPoint("DisableAllBugDetectors")
232241
.dir(bugDetectorDirectory)
@@ -240,6 +249,7 @@ describe("General tests", () => {
240249

241250
it("Jest: Test with EVIL command; SYNC", () => {
242251
const fuzzTest = new FuzzTestBuilder()
252+
.runs(0)
243253
.sync(false)
244254
.dir(bugDetectorDirectory)
245255
.jestTestFile("tests.fuzz.js")
@@ -254,6 +264,7 @@ describe("General tests", () => {
254264

255265
it("Jest: Test with EVIL command; ASYNC", () => {
256266
const fuzzTest = new FuzzTestBuilder()
267+
.runs(0)
257268
.sync(false)
258269
.dir(bugDetectorDirectory)
259270
.jestTestFile("tests.fuzz.js")
@@ -270,6 +281,7 @@ describe("General tests", () => {
270281

271282
it("Jest: Test with FRIENDLY command", () => {
272283
const fuzzTest = new FuzzTestBuilder()
284+
.runs(0)
273285
.sync(false)
274286
.dir(bugDetectorDirectory)
275287
.jestTestFile("tests.fuzz.js")
@@ -281,6 +293,7 @@ describe("General tests", () => {
281293

282294
it("Jest: Test with FRIENDLY command; ASYNC", () => {
283295
const fuzzTest = new FuzzTestBuilder()
296+
.runs(0)
284297
.sync(false)
285298
.dir(bugDetectorDirectory)
286299
.jestTestFile("tests.fuzz.js")
@@ -329,6 +342,7 @@ describe("General tests", () => {
329342

330343
it("Jest: Test with EVIL command; Done callback", () => {
331344
const fuzzTest = new FuzzTestBuilder()
345+
.runs(0)
332346
.sync(false)
333347
.dir(bugDetectorDirectory)
334348
.jestTestFile("tests.fuzz.js")
@@ -345,6 +359,7 @@ describe("General tests", () => {
345359

346360
it("Jest: Test with FRIENDLY command; Done callback", () => {
347361
const fuzzTest = new FuzzTestBuilder()
362+
.runs(0)
348363
.sync(false)
349364
.dir(bugDetectorDirectory)
350365
.jestTestFile("tests.fuzz.js")

tests/bug-detectors/path-traversal.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe("Path Traversal", () => {
3030

3131
it("openSync with EVIL path", () => {
3232
const fuzzTest = new FuzzTestBuilder()
33+
.runs(0)
3334
.sync(true)
3435
.fuzzEntryPoint("PathTraversalFsOpenEvilSync")
3536
.dir(bugDetectorDirectory)
@@ -41,6 +42,7 @@ describe("Path Traversal", () => {
4142

4243
it("open with EVIL path", () => {
4344
const fuzzTest = new FuzzTestBuilder()
45+
.runs(0)
4446
.sync(false)
4547
.fuzzEntryPoint("PathTraversalFsOpenEvilAsync")
4648
.dir(bugDetectorDirectory)
@@ -52,6 +54,7 @@ describe("Path Traversal", () => {
5254

5355
it("mkdirSync with EVIL path", () => {
5456
const fuzzTest = new FuzzTestBuilder()
57+
.runs(0)
5558
.sync(true)
5659
.fuzzEntryPoint("PathTraversalFsMkdirEvilSync")
5760
.dir(bugDetectorDirectory)
@@ -65,6 +68,7 @@ describe("Path Traversal", () => {
6568

6669
it("mkdirSync with SAFE path", () => {
6770
const fuzzTest = new FuzzTestBuilder()
71+
.runs(0)
6872
.sync(true)
6973
.fuzzEntryPoint("PathTraversalFsMkdirSafeSync")
7074
.dir(bugDetectorDirectory)
@@ -76,6 +80,7 @@ describe("Path Traversal", () => {
7680

7781
it("mkdirAsync with EVIL path", () => {
7882
const fuzzTest = new FuzzTestBuilder()
83+
.runs(0)
7984
.sync(false)
8085
.fuzzEntryPoint("PathTraversalFsMkdirEvilAsync")
8186
.dir(bugDetectorDirectory)
@@ -89,6 +94,7 @@ describe("Path Traversal", () => {
8994

9095
it("mkdirAsync with SAFE path", () => {
9196
const fuzzTest = new FuzzTestBuilder()
97+
.runs(0)
9298
.sync(false)
9399
.fuzzEntryPoint("PathTraversalFsMkdirSafeAsync")
94100
.dir(bugDetectorDirectory)
@@ -100,6 +106,7 @@ describe("Path Traversal", () => {
100106

101107
it("mkdir PROMISES with SAFE path", () => {
102108
const fuzzTest = new FuzzTestBuilder()
109+
.runs(0)
103110
.sync(false)
104111
.fuzzEntryPoint("PathTraversalFspMkdirSafeAsync")
105112
.dir(bugDetectorDirectory)
@@ -111,6 +118,7 @@ describe("Path Traversal", () => {
111118

112119
it("mkdir PROMISES with EVIL path", () => {
113120
const fuzzTest = new FuzzTestBuilder()
121+
.runs(0)
114122
.sync(false)
115123
.fuzzEntryPoint("PathTraversalFspMkdirEvilAsync")
116124
.dir(bugDetectorDirectory)
@@ -124,6 +132,7 @@ describe("Path Traversal", () => {
124132

125133
it("open PROMISES with EVIL path", () => {
126134
const fuzzTest = new FuzzTestBuilder()
135+
.runs(0)
127136
.sync(false)
128137
.fuzzEntryPoint("PathTraversalFspOpenEvilAsync")
129138
.dir(bugDetectorDirectory)
@@ -135,6 +144,7 @@ describe("Path Traversal", () => {
135144

136145
it("joinSync with EVIL path", () => {
137146
const fuzzTest = new FuzzTestBuilder()
147+
.runs(0)
138148
.sync(true)
139149
.fuzzEntryPoint("PathTraversalJoinEvilSync")
140150
.dir(bugDetectorDirectory)
@@ -146,6 +156,7 @@ describe("Path Traversal", () => {
146156

147157
it("joinSync with SAFE path", () => {
148158
const fuzzTest = new FuzzTestBuilder()
159+
.runs(0)
149160
.sync(true)
150161
.fuzzEntryPoint("PathTraversalJoinSafeSync")
151162
.dir(bugDetectorDirectory)
@@ -155,6 +166,7 @@ describe("Path Traversal", () => {
155166

156167
it("join with EVIL path", () => {
157168
const fuzzTest = new FuzzTestBuilder()
169+
.runs(0)
158170
.sync(false)
159171
.fuzzEntryPoint("PathTraversalJoinEvilAsync")
160172
.dir(bugDetectorDirectory)
@@ -166,6 +178,7 @@ describe("Path Traversal", () => {
166178

167179
it("join with SAFE path", () => {
168180
const fuzzTest = new FuzzTestBuilder()
181+
.runs(0)
169182
.sync(false)
170183
.fuzzEntryPoint("PathTraversalJoinSafeAsync")
171184
.dir(bugDetectorDirectory)

0 commit comments

Comments
 (0)