Skip to content

Commit 7b626cc

Browse files
committed
adding knex to integration test
1 parent 2f93b1a commit 7b626cc

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

integration-tests/esbuild/basic-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const tracer = require('../../').init() // dd-trace
1111
const assert = require('assert')
1212
const express = require('express')
1313
const http = require('http')
14+
require('knex') // has dead code paths for multiple instrumented packages
1415

1516
const app = express()
1617
const PORT = 31415

integration-tests/esbuild/build.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ esbuild.build({
99
outfile: 'out.js',
1010
plugins: [ddPlugin],
1111
platform: 'node',
12-
target: ['node16']
12+
target: ['node16'],
13+
external: [
14+
// dead code paths introduced by knex
15+
'pg',
16+
'mysql2',
17+
'better-sqlite3',
18+
'sqlite3',
19+
'mysql',
20+
'oracledb',
21+
'pg-query-stream',
22+
'tedious'
23+
]
1324
}).catch((err) => {
1425
console.error(err) // eslint-disable-line no-console
1526
process.exit(1)

integration-tests/esbuild/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"license": "ISC",
2020
"dependencies": {
2121
"esbuild": "0.16.12",
22-
"express": "^4.16.2"
22+
"express": "^4.16.2",
23+
"knex": "^2.4.2"
2324
}
2425
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
"graphql": "0.13.2",
121121
"int64-buffer": "^0.1.9",
122122
"jszip": "^3.5.0",
123+
"knex": "^2.4.2",
123124
"mkdirp": "^0.5.1",
124125
"mocha": "8",
125126
"msgpack-lite": "^0.1.26",

0 commit comments

Comments
 (0)