Fixes plusieurs problèmes pour checker le theme.json généré.

Introduit aussi un launch.json pour mes réinstallations futures de VScode.
Supprime la description.md qui fait échouter ce test prévu pour réussir.
This commit is contained in:
Simon Pistache 2023-05-13 22:54:22 +02:00
parent 8c446eeb4b
commit ac38241629
5 changed files with 51 additions and 5 deletions

30
.vscode/launch.json vendored Normal file
View File

@ -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": [
"<node_internals>/**"
],
"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,
}
]
}

View File

@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "wpp_checker.js", "main": "wpp_checker.js",
"scripts": { "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", "author": "Simon",
"license": "ISC", "license": "ISC",

View File

@ -42,7 +42,7 @@ describe('Mandatory Checks', function () {
const root = process.env["ENTRY_FOLDER"]; const root = process.env["ENTRY_FOLDER"];
expect(root).to.be.a("string").that.is.not.empty; expect(root).to.be.a("string").that.is.not.empty;
workingDirectory = path.join(root, slug); workingDirectory = path.join(root, slug);
const files = fs.readdirSync(workingDirectory); files = fs.readdirSync(workingDirectory);
expect(files).to.be.an('array').that.is.not.empty; expect(files).to.be.an('array').that.is.not.empty;
validator = ajv.compile(JSON.parse(fs.readFileSync(themeSchemaFile, 'utf8'))); validator = ajv.compile(JSON.parse(fs.readFileSync(themeSchemaFile, 'utf8')));
}); });

View File

@ -1,3 +0,0 @@
# some descriptions
Introducting change for testing.

19
test/valid_set/theme.json Normal file
View File

@ -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
}