mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-06-11 09:17:53 +02:00
39 lines
3.2 KiB
JavaScript
39 lines
3.2 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const projectRoot = path.join(__dirname, '..');
|
|
const promptcraftTemplate = fs.readFileSync(path.join(projectRoot, 'templates', 'promptcraft.html'), 'utf8');
|
|
const anticlassifierTemplate = fs.readFileSync(path.join(projectRoot, 'templates', 'anticlassifier.html'), 'utf8');
|
|
const bijectionTemplate = fs.readFileSync(path.join(projectRoot, 'templates', 'bijection.html'), 'utf8');
|
|
const fuzzerTemplate = fs.readFileSync(path.join(projectRoot, 'templates', 'fuzzer.html'), 'utf8');
|
|
const transformsTemplate = fs.readFileSync(path.join(projectRoot, 'templates', 'transforms.html'), 'utf8');
|
|
const promptcraftTool = fs.readFileSync(path.join(projectRoot, 'js', 'tools', 'PromptCraftTool.js'), 'utf8');
|
|
const anticlassifierTool = fs.readFileSync(path.join(projectRoot, 'js', 'tools', 'AntiClassifierTool.js'), 'utf8');
|
|
const bijectionTool = fs.readFileSync(path.join(projectRoot, 'js', 'tools', 'BijectionTool.js'), 'utf8');
|
|
const mutationTool = fs.readFileSync(path.join(projectRoot, 'js', 'tools', 'MutationTool.js'), 'utf8');
|
|
const transformTool = fs.readFileSync(path.join(projectRoot, 'js', 'tools', 'TransformTool.js'), 'utf8');
|
|
const indexTemplate = fs.readFileSync(path.join(projectRoot, 'index.template.html'), 'utf8');
|
|
|
|
assert.ok(promptcraftTemplate.includes('Latin-Root Analysis'), 'PromptCraft should expose the analysis card');
|
|
assert.ok(promptcraftTemplate.includes('pcNeutralizeInput'), 'PromptCraft should expose neutralization action');
|
|
assert.ok(anticlassifierTemplate.includes('Latin-Root Analysis'), 'Anti-Classifier should expose the analysis card');
|
|
assert.ok(anticlassifierTemplate.includes('acNeutralizeInput'), 'Anti-Classifier should expose neutralization action');
|
|
assert.ok(bijectionTemplate.includes('Latin-Root Analysis'), 'Bijection should expose the analysis card');
|
|
assert.ok(bijectionTemplate.includes('bijectionNeutralizeInput'), 'Bijection should expose neutralization action');
|
|
assert.ok(fuzzerTemplate.includes('Latin-Root Analysis'), 'Mutation Lab should expose the analysis card');
|
|
assert.ok(fuzzerTemplate.includes('fuzzerNeutralizeInput'), 'Mutation Lab should expose neutralization action');
|
|
assert.ok(transformsTemplate.includes('Latin-Root Analysis'), 'Transforms should expose the analysis card');
|
|
assert.ok(transformsTemplate.includes('transformNeutralizeInput'), 'Transforms should expose neutralization action');
|
|
assert.ok(promptcraftTool.includes('pcGetLexemeAnalysis'), 'PromptCraft tool should bind shared analysis');
|
|
assert.ok(anticlassifierTool.includes('acGetLexemeAnalysis'), 'Anti-Classifier tool should bind shared analysis');
|
|
assert.ok(bijectionTool.includes('bijectionGetLexemeAnalysis'), 'Bijection tool should bind shared analysis');
|
|
assert.ok(mutationTool.includes('fuzzerGetLexemeAnalysis'), 'Mutation tool should bind shared analysis');
|
|
assert.ok(transformTool.includes('transformGetLexemeAnalysis'), 'Transform tool should bind shared analysis');
|
|
assert.ok(indexTemplate.includes('js/data/latinAffixPolicies.js'), 'Index template should load affix policy data');
|
|
assert.ok(indexTemplate.includes('js/core/lexemeAnalysis.js'), 'Index template should load shared lexeme analysis engine');
|
|
|
|
console.log('Lexeme UI surface tests passed');
|