1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Plugin tests should only apply to core plugins

Hi @pmario could you kindly try this?

Fixes #8207
This commit is contained in:
Jeremy Ruston 2024-05-23 16:28:08 +01:00
parent fc0de10cd1
commit f9df4f0741
2 changed files with 8 additions and 5 deletions

View File

@ -14,8 +14,11 @@ Utilities for working with the TiddlyWiki repository file structure
/*
Get an object containing all the plugins as a hashmap by title of the JSON representation of the plugin
Options:
ignoreEnvironmentVariables: defaults to false
*/
exports.getAllPlugins = function() {
exports.getAllPlugins = function(options) {
var fs = require("fs"),
path = require("path"),
tiddlers = {};
@ -39,9 +42,9 @@ exports.getAllPlugins = function() {
}
}
};
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.pluginsPath,$tw.config.pluginsEnvVar),collectPublisherPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.themesPath,$tw.config.themesEnvVar),collectPublisherPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.languagesPath,$tw.config.languagesEnvVar),collectPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.pluginsPath,options.ignoreEnvironmentVariables ? "" : $tw.config.pluginsEnvVar),collectPublisherPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.themesPath,options.ignoreEnvironmentVariables ? "" : $tw.config.themesEnvVar),collectPublisherPlugins);
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.languagesPath,options.ignoreEnvironmentVariables ? "" : $tw.config.languagesEnvVar),collectPlugins);
return tiddlers;
};

View File

@ -17,7 +17,7 @@ if($tw.node) {
describe("Plugin tests", function() {
// Get all the plugins as a hashmap by title of a JSON string with the plugin content
var tiddlers = $tw.utils.getAllPlugins();
var tiddlers = $tw.utils.getAllPlugins({ignoreEnvironmentVariables: true});
// console.log(JSON.stringify(Object.keys(tiddlers),null,4));
describe("every plugin should have the required standard fields", function() {
var titles = Object.keys(tiddlers);