File tree 3 files changed +30
-8
lines changed
packages/datadog-instrumentations/test/helpers
3 files changed +30
-8
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,31 @@ concurrency:
17
17
18
18
19
19
jobs :
20
+ instrumentations-misc :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24
+ - uses : ./.github/actions/testagent/start
25
+ - uses : ./.github/actions/node/oldest-maintenance-lts
26
+ - uses : ./.github/actions/install
27
+ - run : yarn test:instrumentations:misc:ci
28
+ shell : bash
29
+ - uses : ./.github/actions/node/newest-maintenance-lts
30
+ - run : yarn test:instrumentations:misc:ci
31
+ shell : bash
32
+ - uses : ./.github/actions/node/active-lts
33
+ - run : yarn test:instrumentations:misc:ci
34
+ shell : bash
35
+ - uses : ./.github/actions/node/latest
36
+ - run : yarn test:instrumentations:misc:ci
37
+ shell : bash
38
+ - uses : codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
39
+ - if : always()
40
+ uses : ./.github/actions/testagent/logs
41
+ with :
42
+ suffix : test-${{ github.job }}
20
43
21
- # These ones don't have a plugin directory, but exist in the
44
+ # These ones don't have a plugin directory, but exist in the root
22
45
# instrumentations directory, so they need to be run somewhere. This seems to
23
46
# be a reasonable place to run them for now.
24
47
Original file line number Diff line number Diff line change 28
28
"test:trace:core:ci" : " npm run test:trace:core -- --coverage --nyc-arg=--include=\" packages/dd-trace/src/**/*.js\" " ,
29
29
"test:instrumentations" : " mocha -r 'packages/dd-trace/test/setup/mocha.js' 'packages/datadog-instrumentations/test/**/*.spec.js'" ,
30
30
"test:instrumentations:ci" : " nyc --no-clean --include 'packages/datadog-instrumentations/src/**/*.js' -- npm run test:instrumentations" ,
31
+ "test:instrumentations:misc" : " mocha -r 'packages/dd-trace/test/setup/mocha.js' 'packages/datadog-instrumentations/test/*/**/*.spec.js'" ,
32
+ "test:instrumentations:misc:ci" : " nyc --no-clean --include 'packages/datadog-instrumentations/src/**/*.js' -- npm run test:instrumentations:misc" ,
31
33
"test:core" : " tap \" packages/datadog-core/test/**/*.spec.js\" " ,
32
34
"test:core:ci" : " npm run test:core -- --coverage --nyc-arg=--include=\" packages/datadog-core/src/**/*.js\" " ,
33
35
"test:lambda" : " mocha -r \" packages/dd-trace/test/setup/mocha.js\" \" packages/dd-trace/test/lambda/**/*.spec.js\" " ,
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
- require ( '../../../dd-trace/test/setup/tap' )
4
-
5
3
const { executionAsyncId } = require ( 'async_hooks' )
6
- const { expect } = require ( 'chai' )
7
4
const { storage } = require ( '../../../datadog-core' )
8
5
const { AsyncResource } = require ( '../../src/helpers/instrument' )
9
6
@@ -26,8 +23,8 @@ describe('helpers/instrument', () => {
26
23
27
24
const tested = AsyncResource . bind ( function ( a , b , c ) {
28
25
expect ( this ) . to . equal ( self )
29
- expect ( test . asyncResource . asyncId ( ) ) . to . equal ( executionAsyncId ( ) )
30
- expect ( test ) . to . have . length ( 3 )
26
+ expect ( tested . asyncResource . asyncId ( ) ) . to . equal ( executionAsyncId ( ) )
27
+ expect ( tested ) . to . have . length ( 3 )
31
28
} , 'test' , self )
32
29
33
30
tested ( )
@@ -40,8 +37,8 @@ describe('helpers/instrument', () => {
40
37
storage ( 'legacy' ) . run ( 'test2' , ( ) => {
41
38
const tested = asyncResource . bind ( ( a , b , c ) => {
42
39
expect ( storage ( 'legacy' ) . getStore ( ) ) . to . equal ( 'test1' )
43
- expect ( test . asyncResource ) . to . equal ( asyncResource )
44
- expect ( test ) . to . have . length ( 3 )
40
+ expect ( tested . asyncResource ) . to . equal ( asyncResource )
41
+ expect ( tested ) . to . have . length ( 3 )
45
42
} )
46
43
47
44
tested ( )
You can’t perform that action at this time.
0 commit comments