Skip to content

Commit cdf203c

Browse files
committed
removing crappy browser test. Not that useful to anyone
1 parent f4b2131 commit cdf203c

5 files changed

Lines changed: 6 additions & 169 deletions

File tree

docs/BROWSER_USAGE.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -565,14 +565,7 @@ async function safeLoadFile(file) {
565565

566566
## Testing
567567

568-
See [Browser Test Page](../examples/browser-test.html) for interactive testing.
569-
570-
To run the test server:
571-
```bash
572-
node examples/browser-test-server.js
573-
```
574-
575-
Then open: http://localhost:8080/examples/browser-test.html
568+
Use the Vite demo in `examples/vitedemo` for interactive browser testing.
576569

577570
## Troubleshooting
578571

@@ -614,5 +607,4 @@ await processor.loadIntoTree(uint8Array);
614607

615608
- [API Documentation](./API.md)
616609
- [Examples](../examples/)
617-
- [Browser Test Page](../examples/browser-test.html)
618-
- [Test Server](../examples/browser-test-server.js)
610+
- [Vite Browser Demo](../examples/vitedemo)

examples/README.md

Lines changed: 3 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -49,79 +49,7 @@ These pagesets are used by:
4949

5050
To run demo scripts that use these pagesets, see the [scripts/README.md](../scripts/README.md).
5151

52-
## Browser Testing
52+
## Browser Demo (Vite)
5353

54-
### ⚠️ Important Note
55-
56-
AACProcessors is built with TypeScript and outputs CommonJS modules. To use it in a browser, you **must use a bundler** (Vite, Webpack, Rollup, etc.). The browser test page below only validates the library structure - it cannot run actual processors without a bundler.
57-
58-
### Browser Test Page
59-
60-
A dedicated browser test page is available for validating the library structure:
61-
62-
**Start the test server:**
63-
```bash
64-
node examples/browser-test-server.js
65-
```
66-
67-
**Open in your browser:**
68-
```
69-
http://localhost:8080/examples/browser-test.html
70-
```
71-
72-
**What it tests:**
73-
- ✅ Browser build files exist and are accessible
74-
- ✅ Type definitions are present
75-
- ✅ Processor exports are available
76-
-**Does NOT run actual processors** (requires bundler)
77-
78-
### What Gets Tested
79-
80-
The browser test page (`browser-test.html`) verifies:
81-
82-
1. **Module Loading** - Can the browser load the ES modules?
83-
2. **Factory Functions** - Do `getProcessor()` and `getSupportedExtensions()` work?
84-
3. **Processor Instantiation** - Can processors be created?
85-
4. **File Loading** - Can files be loaded from `<input type="file">`?
86-
5. **Buffer Handling** - Do ArrayBuffers/Uint8Arrays work correctly?
87-
6. **Tree Structure** - Can AACTree be created from files?
88-
7. **Text Extraction** - Can texts be extracted from files?
89-
90-
### Supported File Types in Browser
91-
92-
The browser test page supports all browser-compatible processors:
93-
94-
- **DotProcessor** (.dot) - OpenSymbols Board files
95-
- **OpmlProcessor** (.opml) - OPML outline files
96-
- **ObfProcessor** (.obf/.obz) - Open Board Format files
97-
- **GridsetProcessor** (.gridset) - Grid 3 gridset files (not .gridsetx)
98-
- **ApplePanelsProcessor** (.plist) - Apple Panels files
99-
- **AstericsGridProcessor** (.grd) - Asterics Grid files
100-
101-
### Manual Testing
102-
103-
1. Open the browser console (F12 or Cmd+Option+I)
104-
2. Click "Select a file to test" to upload an AAC file
105-
3. Click "Test File" to process it
106-
4. Check the results panel for page count, button count, and extracted texts
107-
108-
### Automated Tests
109-
110-
Click "Run All Browser Tests" to run automated checks:
111-
- Factory function tests
112-
- Extension support tests
113-
- Processor instantiation tests
114-
- Buffer handling tests
115-
116-
### Node-Only Processors
117-
118-
The following processors are **not available** in the browser:
119-
- **SnapProcessor** (.spb/.sps) - Requires SQLite
120-
- **TouchChatProcessor** (.ce) - Requires SQLite
121-
- **ExcelProcessor** (.xlsx) - Uses fs at top level
122-
123-
### Notes
124-
125-
- Gridset `.gridsetx` files (encrypted) are not supported in browser
126-
- All processors work with Buffer, Uint8Array, and ArrayBuffer inputs
127-
- File paths are not supported in browser (use file inputs or fetch)
54+
For browser testing, use the Vite demo in `examples/vitedemo`. It bundles the
55+
library and exercises real processors in a browser environment.

examples/browser-test-server.js

Lines changed: 0 additions & 81 deletions
This file was deleted.

examples/vitedemo/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ The demo will open automatically at: http://localhost:3000
3535
This demo is intended for `npm run dev` only. The production build currently fails because the
3636
demo source includes strict TypeScript issues, so it will not work "out of the box."
3737

38-
If you need a no-build browser check, use the browser test page served by:
39-
`node examples/browser-test-server.js`
38+
This demo is the recommended browser test environment.
4039

4140
## How to Use
4241

examples/vitedemo/package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)