Skip to content

feature request | per project resolveSnapshotPath #9109

@OrbisK

Description

@OrbisK

Clear and concise description of the problem

currently we can have:

export default defineConfig({
  test: {
    resolveSnapshotPath(path, extension) {
      return path.replace(/\/([^/]+)\.spec\.ts$/, `/__snapshots__/$1-vue.spec.ts${extension}`)
    }
  }
})

but we cannot have:

export default defineConfig({
  projects: [
    {
      name: "vue",
      test: {
        resolveSnapshotPath(path, extension) {
          return path.replace(/\/([^/]+)\.spec\.ts$/, `/__snapshots__/$1-vue.spec.ts${extension}`)
        }
      }
    }
  ]
})
Image

Suggested solution

allow resolveSnapshotPath for each project.

Alternative

No response

Additional context

partially related to #1620

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions