Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
iunanua committed Sep 23, 2024
1 parent 30f93ff commit 4d8a78c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/dd-trace/test/appsec/rasp/lfi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ describe('RASP - lfi.js', () => {
}
}
}

sinon.spy(incomingHttpRequestStart, 'subscribe')
sinon.spy(incomingHttpRequestStart, 'unsubscribe')
})

afterEach(() => {
Expand All @@ -60,12 +57,16 @@ describe('RASP - lfi.js', () => {

describe('enable', () => {
it('should subscribe to first http req', () => {
sinon.spy(incomingHttpRequestStart, 'subscribe')

lfi.enable(config)

sinon.assert.calledOnce(incomingHttpRequestStart.subscribe)
})

it('should enable AppsecFsPlugin after the first request', () => {
sinon.spy(incomingHttpRequestStart, 'unsubscribe')

lfi.enable(config)

incomingHttpRequestStart.publish({})
Expand Down

0 comments on commit 4d8a78c

Please sign in to comment.