diff --git a/package.json b/package.json index 67d4c132a19..d10cede935a 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "test:appsec:ci": "nyc --no-clean --include \"packages/dd-trace/src/appsec/**/*.js\" --exclude \"packages/dd-trace/test/appsec/**/*.plugin.spec.js\" -- npm run test:appsec", "test:appsec:plugins": "mocha -r \"packages/dd-trace/test/setup/mocha.js\" \"packages/dd-trace/test/appsec/**/*.@($(echo $PLUGINS)).plugin.spec.js\"", "test:appsec:plugins:ci": "yarn services && nyc --no-clean --include \"packages/dd-trace/src/appsec/**/*.js\" -- npm run test:appsec:plugins", - "test:debugger": "tap packages/dd-trace/test/debugger/**/*.spec.js", - "test:debugger:ci": "npm run test:debugger -- --coverage --nyc-arg=--include=\"packages/dd-trace/src/debugger/**/*.js\"", + "test:debugger": "mocha -r 'packages/dd-trace/test/setup/mocha.js' 'packages/dd-trace/test/debugger/**/*.spec.js'", + "test:debugger:ci": "nyc --no-clean --include 'packages/dd-trace/src/debugger/**/*.js' -- npm run test:debugger", "test:trace:core": "tap packages/dd-trace/test/*.spec.js \"packages/dd-trace/test/{ci-visibility,datastreams,encode,exporters,opentelemetry,opentracing,plugins,service-naming,telemetry}/**/*.spec.js\"", "test:trace:core:ci": "npm run test:trace:core -- --coverage --nyc-arg=--include=\"packages/dd-trace/src/**/*.js\"", "test:instrumentations": "mocha -r 'packages/dd-trace/test/setup/mocha.js' 'packages/datadog-instrumentations/test/**/*.spec.js'", diff --git a/packages/dd-trace/test/debugger/devtools_client/status.spec.js b/packages/dd-trace/test/debugger/devtools_client/status.spec.js index 728279c7eca..41433f453c5 100644 --- a/packages/dd-trace/test/debugger/devtools_client/status.spec.js +++ b/packages/dd-trace/test/debugger/devtools_client/status.spec.js @@ -1,12 +1,12 @@ 'use strict' -require('../../setup/tap') +require('../../setup/mocha') const ddsource = 'dd_debugger' const service = 'my-service' const runtimeId = 'my-runtime-id' -describe('diagnostic message http request caching', () => { +describe('diagnostic message http request caching', function () { let statusproxy, request const acks = [ @@ -16,7 +16,7 @@ describe('diagnostic message http request caching', () => { ['ackError', 'ERROR', new Error('boom')] ] - beforeEach(() => { + beforeEach(function () { request = sinon.spy() request['@noCallThru'] = true @@ -27,10 +27,10 @@ describe('diagnostic message http request caching', () => { }) for (const [ackFnName, status, err] of acks) { - describe(ackFnName, () => { + describe(ackFnName, function () { let ackFn, exception - beforeEach(() => { + beforeEach(function () { if (err) { ackFn = statusproxy[ackFnName].bind(null, err) // Use `JSON.stringify` to remove any fields that are `undefined` @@ -45,7 +45,7 @@ describe('diagnostic message http request caching', () => { } }) - it('should only call once if no change', () => { + it('should only call once if no change', function () { ackFn({ id: 'foo', version: 0 }) expect(request).to.have.been.calledOnce assertRequestData(request, { probeId: 'foo', version: 0, status, exception }) @@ -54,7 +54,7 @@ describe('diagnostic message http request caching', () => { expect(request).to.have.been.calledOnce }) - it('should call again if version changes', () => { + it('should call again if version changes', function () { ackFn({ id: 'foo', version: 0 }) expect(request).to.have.been.calledOnce assertRequestData(request, { probeId: 'foo', version: 0, status, exception }) @@ -64,7 +64,7 @@ describe('diagnostic message http request caching', () => { assertRequestData(request, { probeId: 'foo', version: 1, status, exception }) }) - it('should call again if probeId changes', () => { + it('should call again if probeId changes', function () { ackFn({ id: 'foo', version: 0 }) expect(request).to.have.been.calledOnce assertRequestData(request, { probeId: 'foo', version: 0, status, exception })