Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"retry": "^0.13.1",
"semifies": "^1.0.0",
"semver": "^7.7.2",
"sinon": "^21.0.1",
"sinon": "^21.0.2",
"tiktoken": "^1.0.21",
"typescript": "^5.9.2",
"workerpool": "^10.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ withVersions('passport-http', 'passport-http', version => {

beforeEach(() => {
subscriberStub = sinon.stub()
sinon.reset()
})

after(() => {
Expand Down Expand Up @@ -202,7 +203,7 @@ withVersions('passport-http', 'passport-http', version => {
login: 'test',
user: { _id: 1, username: 'test', password: '1234', email: 'testuser@ddog.com' },
success: true,
abortController: new AbortController(),
abortController: sinon.match(ac => ac instanceof AbortController && ac.signal.aborted === true),
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ withVersions('passport-local', 'passport-local', version => {
login: 'test',
user: { _id: 1, username: 'test', password: '1234', email: 'testuser@ddog.com' },
success: true,
abortController: new AbortController(),
abortController: sinon.match(ac => ac instanceof AbortController && ac.signal.aborted === true),
})
})
})
Expand Down
2 changes: 0 additions & 2 deletions packages/dd-trace/test/appsec/index.express.plugin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ withVersions('express', 'express', version => {

afterEach(() => {
appsec.disable()
// TODO: Remove the workaround once https://github.com/sinonjs/sinon/issues/2671 is resolved
paramCallbackSpy.resetHistory()
sinon.reset()
})

Expand Down
3 changes: 0 additions & 3 deletions packages/dd-trace/test/appsec/index.fastify.plugin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,6 @@ withVersions('fastify', 'fastify', '>=2', (fastifyVersion, _, fastifyLoadedVersi

afterEach(() => {
appsec.disable()
// TODO: Remove the workaround once https://github.com/sinonjs/sinon/issues/2671 is resolved
preHandlerHookSpy.resetHistory()
preValidationHookSpy.resetHistory()
sinon.reset()
})

Expand Down
2 changes: 1 addition & 1 deletion packages/dd-trace/test/datastreams/processor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('DataStreamsProcessor', () => {
it('should export on interval', () => {
processor.recordCheckpoint(mockCheckpoint)
processor.onInterval()
sinon.assert.calledWith(writer.flush, {
assert.deepStrictEqual(writer.flush.lastCall.args[0], {
Env: 'test',
Service: 'service1',
Version: 'v1',
Expand Down
12 changes: 6 additions & 6 deletions packages/dd-trace/test/span_stats.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ describe('SpanStatsProcessor', () => {
processor = new SpanStatsProcessor(config)
clearTimeout(processor.timer)

assert.ok(SpanStatsExporter.calledWith({
assert.deepStrictEqual(SpanStatsExporter.lastCall.args[0], {
hostname: config.hostname,
port: config.port,
url: config.url,
tags: config.tags,
}))
})
assert.strictEqual(processor.interval, config.stats.interval)
assert.ok(processor.buckets instanceof TimeBuckets)
assert.strictEqual(processor.hostname, hostname())
Expand Down Expand Up @@ -362,7 +362,7 @@ describe('SpanStatsProcessor', () => {
it('should export on interval', () => {
processor.onInterval()

assert.ok(exporter.export.calledWith({
assert.deepStrictEqual(exporter.export.lastCall.args[0], {
Hostname: hostname(),
Env: config.env,
Version: config.version,
Expand Down Expand Up @@ -391,7 +391,7 @@ describe('SpanStatsProcessor', () => {
RuntimeID: processor.tags['runtime-id'],
Sequence: processor.sequence,
ProcessTags: processTags.serialized,
}))
})
})

it('should export on interval with default version', () => {
Expand All @@ -400,7 +400,7 @@ describe('SpanStatsProcessor', () => {
const processor = new SpanStatsProcessor(versionlessConfig)
processor.onInterval()

assert.ok(exporter.export.calledWith({
assert.deepStrictEqual(exporter.export.lastCall.args[0], {
Hostname: hostname(),
Env: config.env,
Version: version,
Expand All @@ -410,6 +410,6 @@ describe('SpanStatsProcessor', () => {
RuntimeID: processor.tags['runtime-id'],
Sequence: processor.sequence,
ProcessTags: processTags.serialized,
}))
})
})
})
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -883,17 +883,17 @@
dependencies:
type-detect "4.0.8"

"@sinonjs/fake-timers@^15.1.0":
"@sinonjs/fake-timers@^15.1.1":
version "15.1.1"
resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-15.1.1.tgz#e1a6f7171941aadcc31d2cea1744264d58b8b34c"
integrity sha512-cO5W33JgAPbOh07tvZjUOJ7oWhtaqGHiZw+11DPbyqh2kHTBc3eF/CjJDeQ4205RLQsX6rxCuYOroFQwl7JDRw==
dependencies:
"@sinonjs/commons" "^3.0.1"

"@sinonjs/samsam@^8.0.3":
version "8.0.3"
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.3.tgz#eb6ffaef421e1e27783cc9b52567de20cb28072d"
integrity sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==
"@sinonjs/samsam@^9.0.2":
version "9.0.2"
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-9.0.2.tgz#ff0ad0e50e41942891588989615fbc4df569b76b"
integrity sha512-H/JSxa4GNKZuuU41E3b8Y3tbSEx8y4uq4UH1C56ONQac16HblReJomIvv3Ud7ANQHQmkeSowY49Ij972e/pGxQ==
dependencies:
"@sinonjs/commons" "^3.0.1"
type-detect "^4.1.0"
Expand Down Expand Up @@ -1608,7 +1608,7 @@ diff@^7.0.0:
resolved "https://registry.yarnpkg.com/diff/-/diff-7.0.0.tgz#3fb34d387cd76d803f6eebea67b921dab0182a9a"
integrity sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==

diff@^8.0.2:
diff@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/diff/-/diff-8.0.3.tgz#c7da3d9e0e8c283bb548681f8d7174653720c2d5"
integrity sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==
Expand Down Expand Up @@ -3992,15 +3992,15 @@ signal-exit@^4.0.1:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==

sinon@^21.0.1:
version "21.0.1"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-21.0.1.tgz#36b9126065a44906f7ba4a47b723b99315a8c356"
integrity sha512-Z0NVCW45W8Mg5oC/27/+fCqIHFnW8kpkFOq0j9XJIev4Ld0mKmERaZv5DMLAb9fGCevjKwaEeIQz5+MBXfZcDw==
sinon@^21.0.2:
version "21.0.2"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-21.0.2.tgz#2dca6fc59eca5288d9f2284925e9ae586085f917"
integrity sha512-VHV4UaoxIe5jrMd89Y9duI76T5g3Lp+ET+ctLhLDaZtSznDPah1KKpRElbdBV4RwqWSw2vadFiVs9Del7MbVeQ==
dependencies:
"@sinonjs/commons" "^3.0.1"
"@sinonjs/fake-timers" "^15.1.0"
"@sinonjs/samsam" "^8.0.3"
diff "^8.0.2"
"@sinonjs/fake-timers" "^15.1.1"
"@sinonjs/samsam" "^9.0.2"
diff "^8.0.3"
supports-color "^7.2.0"

source-map@^0.6.1:
Expand Down
Loading