Skip to content

Commit

Permalink
[test visibility] Cap vitest support until we fix it (#4681)
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-fernandez committed Oct 1, 2024
1 parent 7a80a09 commit 3fe61fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion integration-tests/vitest/vitest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const {
TEST_COMMAND
} = require('../../packages/dd-trace/src/plugins/util/test')

const versions = ['1.6.0', 'latest']
const versions = ['1.6.0', '2.0.5']

const linePctMatchRegex = /Lines\s+:\s+([\d.]+)%/

Expand Down
8 changes: 4 additions & 4 deletions packages/datadog-instrumentations/src/vitest.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function getCreateCliWrapper (vitestPackage, frameworkVersion) {

addHook({
name: 'vitest',
versions: ['>=1.6.0'],
versions: ['>=1.6.0 <2.1.0'],
file: 'dist/runners.js'
}, (vitestPackage) => {
const { VitestTestRunner } = vitestPackage
Expand Down Expand Up @@ -270,7 +270,7 @@ addHook({

addHook({
name: 'vitest',
versions: ['>=2.0.5'],
versions: ['>=2.0.5 <2.1.0'],
filePattern: 'dist/chunks/index.*'
}, (vitestPackage) => {
if (isReporterPackageNewest(vitestPackage)) {
Expand All @@ -289,15 +289,15 @@ addHook({

addHook({
name: 'vitest',
versions: ['>=2.0.5'],
versions: ['>=2.0.5 <2.1.0'],
filePattern: 'dist/chunks/cac.*'
}, getCreateCliWrapper)

// test suite start and finish
// only relevant for workers
addHook({
name: '@vitest/runner',
versions: ['>=1.6.0'],
versions: ['>=1.6.0 <2.1.0'],
file: 'dist/index.js'
}, (vitestPackage, frameworkVersion) => {
shimmer.wrap(vitestPackage, 'startTests', startTests => async function (testPath) {
Expand Down

0 comments on commit 3fe61fa

Please sign in to comment.