UNPKG

@ordojs/core

Version:

Core compiler and runtime for OrdoJS framework

30 lines (23 loc) 784 B
/** * @fileoverview Debug HTML parsing */ import { describe, expect, it } from 'vitest'; import { OrdoJSLexer } from './lexer.js'; describe('Debug HTML', () => { it('should show tokens for HTML content', () => { const source = ` component TestComponent { markup { <div>Hello World</div> } } `; const lexer = new OrdoJSLexer(source, 'test.ordo'); const tokens = lexer.tokenize(); // Find tokens starting from markup block const markupIndex = tokens.tokens.findIndex(t => t.type === 'MARKUP'); const relevantTokens = tokens.tokens.slice(markupIndex); console.log('Markup tokens:', relevantTokens.map(t => ({ type: t.type, value: t.value }))); expect(tokens.tokens.length).toBeGreaterThan(0); }); });