import fs from 'node:fs';import assert from 'node:assert/strict';import {createRequire} from 'node:module';import {pathToFileURL} from 'node:url';import {transformWithOxc} from 'vite';import React from 'react';import {renderToStaticMarkup} from 'react-dom/server'; const require=createRequire(import.meta.url);let source=fs.readFileSync('resources/js/FiscalCoverage.jsx','utf8').replace("from 'react'",'from '+JSON.stringify(pathToFileURL(require.resolve('react')).href));const transformed=await transformWithOxc(source,'FiscalCoverage.jsx',{jsx:{runtime:'classic'}});const {default:Component}=await import('data:text/javascript;base64,'+Buffer.from(transformed.code).toString('base64'));const c=JSON.parse(fs.readFileSync(process.argv[2],'utf8')); const html=renderToStaticMarkup(React.createElement(Component,{coverage:c}));const checks=[];const ok=(v,n)=>{assert(v,n);checks.push(n);};ok(renderToStaticMarkup(React.createElement(Component,{}))==='','no invented coverage while waiting');ok(c.taxes.every(t=>html.includes(t.label)),'all seven families visible');ok(html.includes('Por implementar')&&html.includes('Parcial — âmbito delimitado'),'pending and partial distinct');ok(!html.includes('