Skip to content

Commit

Permalink
fix express test
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev committed Jun 22, 2024
1 parent f81ccc6 commit 5107046
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ describe('Path params sourcing with express', () => {

app.use('/:parameterParent', nestedRouter)

appListener = app.listen(0, 'localhost', port => {
appListener = app.listen(0, 'localhost', () => {
const port = appListener.address().port

axios
.get(`http://localhost:${port}/tainted1/tainted2`)
.then(() => done())
Expand All @@ -189,7 +191,9 @@ describe('Path params sourcing with express', () => {
app.param('parameter1', checkParamIsTaintedAndNext)
app.param('parameter2', checkParamIsTaintedAndNext)

appListener = app.listen(0, 'localhost', port => {
appListener = app.listen(0, 'localhost', () => {
const port = appListener.address().port

axios
.get(`http://localhost:${port}/tainted1/tainted2`)
.then(() => done())
Expand All @@ -211,7 +215,9 @@ describe('Path params sourcing with express', () => {
app.param('parameter1')
app.param('parameter2')

appListener = app.listen(0, 'localhost', port => {
appListener = app.listen(0, 'localhost', () => {
const port = appListener.address().port

axios
.get(`http://localhost:${port}/tainted1/tainted2`)
.then(() => done())
Expand Down

0 comments on commit 5107046

Please sign in to comment.