Skip to content

[Feature] Add testFilePathName to snapshotPathTemplate (without extension) #24171

Description

export default defineConfig({
	
	// test files
	testMatch: '/__tests__/*.specs.js',

}).extend(

        // for each test file a specific SnapshotPathTemplate
	overrideSnapshotPathTemplate({
		'/__tests__/testUser1.specs.js': {
			snapshotPathTemplate: './__tests__/testUser1/{snapshotSuffix}/{arg}{ext}',
		},
		'/__tests__/testUser2.specs.js': {
			snapshotPathTemplate: './__tests__/testUser2/{snapshotSuffix}/{arg}{ext}',
		},
	})
);

Such a configuration would be desirable.
Of course it may be possible in other ways?
Unfortunately I havn't found anything in the documentation so far.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions