Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
uurien committed Jun 13, 2024
1 parent c3a5af3 commit ee28b92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions packages/datadog-instrumentations/test/http.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ describe('client', () => {

it('abortController is sent on startChannel', (done) => {
http.get(url, (res) => {
res.on('data', () => {
})
res.on('data', () => {})
res.on('end', () => {
done()
})
Expand All @@ -92,6 +91,7 @@ describe('client', () => {
const cr = http.get(url, () => {
done('Request should be blocked')
})

cr.on('error', (e) => {
try {
assert.instanceOf(e, Error)
Expand All @@ -115,6 +115,7 @@ describe('client', () => {
const cr = http.get(url, () => {
done('Request should be blocked')
})

cr.on('error', (e) => {
try {
assert.instanceOf(e, CustomError)
Expand All @@ -132,6 +133,7 @@ describe('client', () => {
const cr = http.get(url, () => {
done('Request should be blocked')
})

cr.on('error', () => {
try {
sinon.assert.calledOnce(errorChannelCb)
Expand All @@ -149,6 +151,7 @@ describe('client', () => {
const cr = http.get(url, () => {
done('Request should be blocked')
})

cr.on('error', () => {
try {
sinon.assert.called(endChannelCb)
Expand All @@ -167,6 +170,7 @@ describe('client', () => {
const cr = http.get(url, () => {
done('Request should be blocked')
})

cr.on('error', () => {
try {
// Necessary because the tracer makes extra requests to the agent
Expand Down
2 changes: 0 additions & 2 deletions packages/dd-trace/src/appsec/blocking.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ function block (req, res, rootSpan, abortController, actionParameters) {
responseBlockedSet.add(res)

abortController?.abort()

// TODO add res in blocked weak set when response blocking is merged
}

function getBlockingAction (actions) {
Expand Down

0 comments on commit ee28b92

Please sign in to comment.