Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test visibility] Cap vitest support until we fix it #4681

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading