feat: working through the dynamic testing portion of ligmata
This commit is contained in:
parent
8859e43ac9
commit
90fdc7aa06
9 changed files with 113 additions and 58 deletions
|
|
@ -1,6 +1,23 @@
|
|||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
module.exports.package_json = function(config) {
|
||||
const package_json = require("../package.json");
|
||||
package_json.scripts.test = `jest ${config.dsa.join(" ")}`;
|
||||
|
||||
package_json.kata_stats = config.dsa.reduce((acc, ds) => {
|
||||
if (!acc[ds]) {
|
||||
acc[ds] = 0;
|
||||
}
|
||||
acc[ds]++;
|
||||
return acc;
|
||||
}, package_json.kata_stats || {});
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, "..", "package.json"),
|
||||
JSON.stringify(package_json, null, 4));
|
||||
}
|
||||
|
||||
module.exports.ts_config = function(set_to) {
|
||||
const ts_config = require("../tsconfig.json");
|
||||
ts_config.compilerOptions.paths["@code/*"] = [`${set_to}/*`];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue