Add CLAUDE.md and the test harness
CLAUDE.md records the Nova constraints this extension is built around — established by reading Nova 14.1's bundle and probing its preview server, and expensive to re-derive: no previewer extension point, generated pages must live under the preview root, dot-directories are served, and no API reaches into a preview WebView. It also flags the one unverified assumption, that a tab showing Preview still appears in nova.workspace.textEditors, with its symptom and fix. Tests/ is the harness that built the extension, kept rather than left in a scratchpad: a stubbed Nova runtime backed by the real filesystem, node suites for generation and the four close paths, and a headless-browser render test that skips itself without a browser. It caught the ./ doubling in rebased links and checkbox state not surviving serialization. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TueXpMi7eAtgWPuMr4ii52
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Runs every test. No dependencies beyond node; render.test.js additionally
|
||||
# wants a headless browser and skips itself without one.
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "— syntax —"
|
||||
for f in ../Scripts/*.js ../Assets/preview.js ./*.js; do node --check "$f"; done
|
||||
python3 -c "import json; json.load(open('../extension.json'))"
|
||||
echo "ok"
|
||||
|
||||
for test in generate close render; do
|
||||
echo "— $test —"
|
||||
node "$test.test.js"
|
||||
done
|
||||
Reference in New Issue
Block a user