Skip to content

Commit

Permalink
adding knex to integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed Jun 5, 2023
1 parent 2f93b1a commit 7b626cc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions integration-tests/esbuild/basic-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const tracer = require('../../').init() // dd-trace
const assert = require('assert')
const express = require('express')
const http = require('http')
require('knex') // has dead code paths for multiple instrumented packages

const app = express()
const PORT = 31415
Expand Down
13 changes: 12 additions & 1 deletion integration-tests/esbuild/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ esbuild.build({
outfile: 'out.js',
plugins: [ddPlugin],
platform: 'node',
target: ['node16']
target: ['node16'],
external: [
// dead code paths introduced by knex
'pg',
'mysql2',
'better-sqlite3',
'sqlite3',
'mysql',
'oracledb',
'pg-query-stream',
'tedious'
]
}).catch((err) => {
console.error(err) // eslint-disable-line no-console
process.exit(1)
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"license": "ISC",
"dependencies": {
"esbuild": "0.16.12",
"express": "^4.16.2"
"express": "^4.16.2",
"knex": "^2.4.2"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"graphql": "0.13.2",
"int64-buffer": "^0.1.9",
"jszip": "^3.5.0",
"knex": "^2.4.2",
"mkdirp": "^0.5.1",
"mocha": "8",
"msgpack-lite": "^0.1.26",
Expand Down

0 comments on commit 7b626cc

Please sign in to comment.