test(tests): R4.1e browser harness and TS baselines (Chromium, Firefox, WebKit)
Playwright harness under scripts/browser: 127.0.0.1 server with the DEPLOY CSP, export and import baselines of the TypeScript engine under a 4 GiB RSS watchdog (not a guaranteed memory limit), O9 browser columns in inflate.browsers.json (26 rows agree with Node in all three engines). Results of 2026-10-18 committed; the O9 Node test no longer expects browser columns in inflate.json.
This commit is contained in:
1 parent
4bdfda59ba
commit
4439fd2420
23 files changed
+20903
-18
No files matched your search
@@ -4,13 +4,11 @@
|
||||
* fed in 16 KiB awaited slices, null on any failure or past the limit) on
|
||||
* the zlib framing cases, inputs under `apps/app/tests/fixtures/pdf/r4/
|
||||
* inflate/`, rows in `crates/core/tests/oracles/r4/inflate.json`. Each row
|
||||
* holds one verdict per engine: this test owns `verdicts.node` and
|
||||
* `engines.node`; the browser harness adds its engines' columns to the same
|
||||
* rows from the same files, and the check here ignores them.
|
||||
* `MAKE_R4_ORACLES=1` writes the inputs and the Node column; it refuses to
|
||||
* overwrite a file that already holds browser columns.
|
||||
* holds the Node verdict; the browser harness (`scripts/browser/
|
||||
* inflate-verdicts.mjs`) runs the same function on the same files in each
|
||||
* engine and writes its columns next to Node's in `inflate.browsers.json`.
|
||||
* `MAKE_R4_ORACLES=1` writes the inputs and this file.
|
||||
*/
|
||||
import { existsSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import {
|
||||
constants,
|
||||
@@ -19,16 +17,14 @@ import {
|
||||
deflateSync,
|
||||
gzipSync,
|
||||
} from 'node:zlib'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { describe, it } from 'vitest'
|
||||
import { MAX_ATTACHMENT_BYTES } from '../src'
|
||||
import { ascii, concat, deflate, KiB, noise } from './helpers/r4-reader-craft'
|
||||
import {
|
||||
expectOnlyFiles,
|
||||
inflateVerdict,
|
||||
MAKE,
|
||||
R4_INPUTS_DIR,
|
||||
R4_ORACLES_DIR,
|
||||
readJsonFile,
|
||||
sha256,
|
||||
storeFile,
|
||||
storeJson,
|
||||
@@ -325,17 +321,8 @@ function nodeColumn(committed: unknown): unknown {
|
||||
}
|
||||
}
|
||||
|
||||
function refuseToDropBrowserColumns(): void {
|
||||
if (!existsSync(OUT)) return
|
||||
const engines = Object.keys(readJsonFile<InflateOracle>(OUT).engines)
|
||||
expect(engines, 'browser columns would be lost: remove them first').toEqual([
|
||||
'node',
|
||||
])
|
||||
}
|
||||
|
||||
describe('R4 inflate oracles O9 (TypeScript freeze, Node)', () => {
|
||||
it('matches the frozen inputs and Node verdicts', async () => {
|
||||
if (MAKE) refuseToDropBrowserColumns()
|
||||
const oracle = await build()
|
||||
storeJson(OUT, oracle, nodeColumn)
|
||||
expectOnlyFiles(
|
||||
|
||||
Reference in new issue
Block a user