/** @jsx h *//** @jsxFrag h */ const {render, html, bind, jsx2} = require('./jsx.js'); const assert = (value, expected) => { /* c8 ignore start */ if (expected !== render(String, value)) { console.error('got ', render(String, value)); console.error('expected', expected); process.exit(1); } /* c8 ignore stop */ }; let h = jsx2.html; // any component (passed as template value) const Bold = ({children}) => html`${children}`; class Span { constructor({id, children}) { return html`${children}`; } } // This is specific for ube or classes with a `tagName` // these well be used as interpolations values function World() { return World.tagName; } World.tagName = 'div'; // any generic value const test = 123; // test it! const myDocument = (

Hello, Hello

); assert( myDocument, `

Hello, Hello

` ); h = jsx2.svg; const svgDocument = ( ); assert( svgDocument, '' ); const fragment = ( <> OK ); assert( fragment, 'OK' ); console.log('Test: \x1b[1mOK\x1b[0m'); const svg = ( hello ); function MyElement({ children }) { return
{children}
; } const me = ( Some Text and some more text ); assert( me, '
Some Text and some more text
' );