Add node-based directive tests for OCaml toplevel
Add comprehensive test suite for toplevel directives running in Node.js:
- #show, #show_type, #show_val, #show_module, #show_exception
- #print_depth, #print_length
- #install_printer, #remove_printer
- #warnings, #warn_error
- #rectypes, #directory, #help, #labels, #principal
- Error cases for unknown directives and missing identifiers
Fixes to test infrastructure:
- Use %{lib:js_top_worker:stubs.js} instead of +js_top_worker/stubs.js
(the + syntax requires an installed package, not a local one)
- Remove stderr flusher in capture function (causes hangs in js_of_ocaml)
- Restore stdout flusher after capture so Printf.printf works for test output
29/31 tests pass; 2 known failures where errors go to stderr rather
than being captured in result.script.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>