6.1.0
withPathSeparator(separator: "/" | "\")
🆕
withPathSeparator
option allows you enforcing a specific path separator regardless of what platform the code is running on. This is especially useful if your test snapshots contain paths as those snapshots will fail on Windows because Node.js uses \\
path separator on Windows by default.
For example:
const files = await new fdir().withFullPaths().withPathSeparator("/").crawl("node_modules").withPromise();