From 1aea8b0d7d4711d143de6dc06b0691f9967c5718 Mon Sep 17 00:00:00 2001 From: tegwick Date: Tue, 16 Dec 2025 22:47:56 +0100 Subject: [PATCH] test: add browser test files for all bundle formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 6 Complete: - ✅ Created test/umd-test.html (UMD bundle verification) - ✅ Created test/minified-test.html (production build test) - ✅ Created test/esm-test.html (ES Module format test) Each test file demonstrates: - Bundle loading and initialization - marked.js peer dependency integration - Control panels and event system - Complete feature showcase - Usage examples and code snippets Tests verify all build outputs work correctly in browsers. Open any test/*.html file in a browser to verify functionality. --- test/esm-test.html | 135 ++++++++++++++++++++++++++++++++++ test/minified-test.html | 157 ++++++++++++++++++++++++++++++++++++++++ test/umd-test.html | 144 ++++++++++++++++++++++++++++++++++++ 3 files changed, 436 insertions(+) create mode 100644 test/esm-test.html create mode 100644 test/minified-test.html create mode 100644 test/umd-test.html diff --git a/test/esm-test.html b/test/esm-test.html new file mode 100644 index 0000000..5ccb58b --- /dev/null +++ b/test/esm-test.html @@ -0,0 +1,135 @@ + + + + + + TestDrive-JSUI - ESM Bundle Test + + + + +

📦 TestDrive-JSUI ESM Bundle Test

+ +
+ 📍 Testing: ES Module build from dist/testdrive-jsui.esm.js
+ 📦 Format: ES6 Modules (import/export syntax)
+ 🎯 Use Case: Modern bundlers (Webpack, Rollup, Vite) +
+ +
+ Status: Loading... +
+ +
+ + + + + + + + diff --git a/test/minified-test.html b/test/minified-test.html new file mode 100644 index 0000000..4fbf0d7 --- /dev/null +++ b/test/minified-test.html @@ -0,0 +1,157 @@ + + + + + + TestDrive-JSUI - Minified Bundle Test + + + + +
+

🚀 TestDrive-JSUI Minified Build

+

+ v1.0.0 + 107KB Minified + Production Ready +

+ +
+ Testing: Minified production build dist/testdrive-jsui.min.js
+ Size Reduction: 217KB → 107KB (50% smaller!)
+ Performance: Optimized for production use +
+ +
+ + +
+ + + + + + + + +\`\`\` + +### Via npm +\`\`\`bash +npm install testdrive-jsui marked +\`\`\` + +### Browser Usage +\`\`\`javascript +const editor = new TestDriveJSUI({ + container: '#my-editor', + markdown: '# My Document', + mode: 'edit' +}); +\`\`\` + +## Try It Out + +Click any section above to start editing. The minified build performs identically to the development build, but loads faster and uses less bandwidth. + +--- + +**Ready for production deployment! 🚀**`, + mode: 'edit', + autosave: false, + controls: { + editControl: true, + statusControl: true, + contentsControl: true + } + }); + + editor.on('initialized', () => { + console.log('✅ Minified bundle initialized successfully!'); + console.log('📊 Performance optimized and ready for production'); + }); + + + diff --git a/test/umd-test.html b/test/umd-test.html new file mode 100644 index 0000000..7255bfe --- /dev/null +++ b/test/umd-test.html @@ -0,0 +1,144 @@ + + + + + + TestDrive-JSUI - UMD Bundle Test + + + + +

🚀 TestDrive-JSUI UMD Bundle Test

+ +
+ 📍 Testing: UMD build from dist/testdrive-jsui.js
+ 💾 File Size: ~217KB (unminified)
+ 🎯 Purpose: Verify bundle works in browser with UMD format +
+ +
+ Status: Loading... +
+ +
+ + + + + + + + + +