diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7ac5fa6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,30 @@ +{ + // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. + // Pointez pour afficher la description des attributs existants. + // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Tester avec Valid_set", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/src/test_manifest_job/node_modules/mocha/bin/_mocha", + "args": [ + "${workspaceFolder}/src/test_manifest_job/wpp_checker.js", + "--require mocha-steps", + "--colors", + ], + "env": { + "ENTRY_FOLDER": "test", + "PACKAGE_NAME": "valid_set" + }, + "internalConsoleOptions": "openOnSessionStart", + "console": "integratedTerminal", + "cwd": "${workspaceFolder}", + "autoAttachChildProcesses": true, + } + ] +} \ No newline at end of file diff --git a/src/test_manifest_job/package.json b/src/test_manifest_job/package.json index 1458c7c..86af811 100644 --- a/src/test_manifest_job/package.json +++ b/src/test_manifest_job/package.json @@ -4,7 +4,7 @@ "description": "", "main": "wpp_checker.js", "scripts": { - "test": "mocha wpp_checker.js --require mocha-steps --colors" + "test": "src/test_manifest_job/node_modules/mocha/bin/_mocha --require mocha-steps --colors src/test_manifest_job/wpp_checker.js" }, "author": "Simon", "license": "ISC", diff --git a/src/test_manifest_job/wpp_checker.js b/src/test_manifest_job/wpp_checker.js index 21d523b..a026224 100644 --- a/src/test_manifest_job/wpp_checker.js +++ b/src/test_manifest_job/wpp_checker.js @@ -42,7 +42,7 @@ describe('Mandatory Checks', function () { const root = process.env["ENTRY_FOLDER"]; expect(root).to.be.a("string").that.is.not.empty; workingDirectory = path.join(root, slug); - const files = fs.readdirSync(workingDirectory); + files = fs.readdirSync(workingDirectory); expect(files).to.be.an('array').that.is.not.empty; validator = ajv.compile(JSON.parse(fs.readFileSync(themeSchemaFile, 'utf8'))); }); diff --git a/test/valid_set/description.md b/test/valid_set/description.md deleted file mode 100644 index aad958a..0000000 --- a/test/valid_set/description.md +++ /dev/null @@ -1,3 +0,0 @@ -# some descriptions - -Introducting change for testing. diff --git a/test/valid_set/theme.json b/test/valid_set/theme.json new file mode 100644 index 0000000..4653a60 --- /dev/null +++ b/test/valid_set/theme.json @@ -0,0 +1,19 @@ +{ + "dayImageList": [ + 1 + ], + "nightImageList": [ + 3 + ], + "sunsetImageList": [ + 2 + ], + "sunriseImageList": [ + 4 + ], + "imageFilename": "bl2_eridum_badlands_*.jpg", + "imageCredits": "© Thoscellen, © 2K Games, © Gearbox Software", + "displayName": "Eridum Badlands", + "dayHighlight": 1, + "nightHighlight": 3 +} \ No newline at end of file