Fixe "workingDirectory is not defined"

This commit is contained in:
Simon Pistache 2023-05-13 12:16:42 +02:00
parent 798f6de969
commit 6d0a52a5df

View File

@ -13,6 +13,7 @@ const themeSchemaFile = "src/test_manifest_job/json_theme_schema.jsonc";
let wppManifest;
let validator;
let files;
let workingDirectory;
function leftOuterJoin(leftArray, rightArray) {
return leftArray.filter(function (el) {
@ -40,7 +41,7 @@ describe('Mandatory Checks', function () {
expect(slug).to.be.a("string").that.is.not.empty;
const root = process.env["ENTRY_FOLDER"];
expect(root).to.be.a("string").that.is.not.empty;
const workingDirectory = path.join(root, slug);
workingDirectory = path.join(root, slug);
const files = fs.readdirSync(workingDirectory);
expect(files).to.be.an('array').that.is.not.empty;
validator = ajv.compile(JSON.parse(fs.readFileSync(themeSchemaFile, 'utf8')));