You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add dirname functions to return a directory name
This is useful when you don't want to create a directory with vitest-testdirs, but just want to generate a path that you can be created by something else.
@@ -210,3 +211,24 @@ export function processDirectorySync(
210
211
211
212
returnfiles;
212
213
}
214
+
215
+
/**
216
+
* Generates a normalized directory path based on the provided dirname or the current test/suite context.
217
+
* This function must be called within a Vitest context.
218
+
*
219
+
* @param {string?} dirname - Optional directory name to use as the base path
220
+
* @returns {string} A normalized absolute path combining the base directory with either the provided dirname or a generated name from the current test/suite
0 commit comments