feat: establish reproducible FreeCAD web compatibility baseline
This commit is contained in:
5
scripts/check-chrome-native-polar-pattern-history.mjs
Normal file
5
scripts/check-chrome-native-polar-pattern-history.mjs
Normal file
@@ -0,0 +1,5 @@
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { resolve } from 'node:path'
|
||||
const report = JSON.parse(await readFile(resolve(new URL('..', import.meta.url).pathname, 'config/chrome-native-polar-pattern-history-verification.json'), 'utf8'))
|
||||
if (report.status !== 'pass' || report.browserId !== 'chrome' || report.nativeCapabilities?.operations?.includes('polar-pattern') !== true || report.history?.recordCount <= 0 || JSON.stringify(report.history?.sourceObjects) !== JSON.stringify(['Base']) || report.result?.bitbybitSolids !== 1 || Math.abs(report.result.bitbybitVolume - 3) > 1e-7 || report.result?.nativeStructuralValid !== true || report.result?.nativeSolids !== 1 || Math.abs(report.result.nativeVolume - 3) > 1e-7 || report.opfs?.markerRemoved !== true || report.afterRelease?.shapeCount !== 0 || report.afterRelease?.kernelReferenceCount !== 0) throw new Error('Chrome native PolarPattern evidence is invalid.')
|
||||
console.log(JSON.stringify({ status: 'chrome-native-polar-pattern-history-pass', records: report.history.recordCount, relations: report.history.relations, result: report.result, afterRelease: report.afterRelease }, null, 2))
|
||||
Reference in New Issue
Block a user