skip test on windows without admin

This commit is contained in:
Tobias Koppers 2021-11-15 10:31:33 +01:00
parent d2c5c1f623
commit cdf9427bb5
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
const fs = require("fs");
const path = require("path");
module.exports = () => {
try {
fs.symlinkSync(
path.join(__dirname, "index.js"),
path.join(__dirname, ".testlink"),
"file"
);
fs.unlinkSync(path.join(__dirname, ".testlink"));
return true;
} catch (e) {
return false;
}
};