mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-02-13 17:22:52 +00:00
Tests
Test Suites
test_universal.js
Tests universal decoder and all transformers:
- Encoding/decoding round-trips
- Universal decoder detection accuracy
- Edge cases and Unicode handling
npm run test:universal
test_steganography_options.js
Tests steganography with all advanced option combinations:
- Bit order (MSB/LSB)
- Variation selector mapping
- Initial presentation options
- Zero-width character options
npm run test:steg
Running Tests
npm run test:all # Run all tests
npm test # Universal decoder tests
npm run test:steg # Steganography tests
Test Structure
Tests use Node.js vm module to create sandboxed environments that mirror the browser context.
Adding New Tests
- Place test files in
tests/directory - Use
path.resolve(__dirname, '..')for project root - Add corresponding npm script in
package.json