mirror of
https://github.com/alphaXiv/OpenResearch.git
synced 2026-11-11 09:59:34 +08:00
* Make the nanochat demo quick and render interactive experiment figures * Fix chart ranges and bound inline preview sizing * Refine demo results, chart interactions, and image carousels * Split experiment evidence skills and address chart review feedback * Preserve zoom selections and format small axis ticks * Choose axis label precision from tick spacing * Keep single training-step ticks exact after zoom * Retain visible confidence bands and skip empty keyboard slices * Load results guidance before experiment summaries and avoid duplicate comparisons
18 lines
655 B
JavaScript
18 lines
655 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { inlineHtmlHeight } from "../src/htmlPreviewSizing.ts";
|
|
|
|
test("inline figures keep natural heights and reject malformed messages", () => {
|
|
assert.equal(inlineHtmlHeight(418.2), 419);
|
|
for (const value of [null, "418", 0, -1, NaN, Infinity]) {
|
|
assert.equal(inlineHtmlHeight(value), null);
|
|
}
|
|
});
|
|
|
|
test("viewport height plus body margins converges instead of growing indefinitely", () => {
|
|
let height = 360;
|
|
for (let i = 0; i < 100; i++) height = inlineHtmlHeight(height + 16);
|
|
assert.equal(inlineHtmlHeight(height + 16), height);
|
|
assert.ok(height <= 1200);
|
|
});
|