Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

test: use a junction to link the config fixture on Windows (#6218)

Mostafa Nazaria6b5d981b641
diff --git a/test/integration/config.spec.cjs b/test/integration/config.spec.cjs
index a391278e..1384d644 100644
--- a/test/integration/config.spec.cjs
+++ b/test/integration/config.spec.cjs
@@ -75,12 +75,13 @@ describe("config", function () {
var pkgName = "mocha-config";
var installedLocally = false;
var symlinkedPkg = false;
+ var linkType = process.platform === "win32" ? "junction" : "dir";
before(function () {
try {
var srcPath = path.join(configDir, pkgName);
var targetPath = path.join(nodeModulesDir, pkgName);
- fs.symlinkSync(srcPath, targetPath, "dir");
+ fs.symlinkSync(srcPath, targetPath, linkType);
symlinkedPkg = true;
installedLocally = true;
} catch (err) {