Skip to content

Commit

Permalink
remove usage of npm show
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev committed Jan 8, 2025
1 parent 562e444 commit 52e72d1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/dd-trace/test/llmobs/sdk/typescript/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,14 @@ const testCases = [
}
]

// a bit of devex to show the version we're actually testing
// so we don't need to know ahead of time
function getLatestVersion (range) {
const command = `npm show typescript@${range} version`
const output = execSync(command, { encoding: 'utf-8' }).trim()
const versions = output.split('\n').map(line => line.split(' ')[1].replace(/'/g, ''))
return versions[versions.length - 1]
}

describe('typescript', () => {
let agent
let proc
let sandbox

for (const version of testVersions) {
context(`with version ${getLatestVersion(version)}`, () => {
// TODO: Figure out the real version without using `npm show` as it's broken.
context(`with version ${version}`, () => {
before(async function () {
this.timeout(20000)
sandbox = await createSandbox(
Expand Down

0 comments on commit 52e72d1

Please sign in to comment.