The Langium document or parsed document to check for issues.
Optional
parameters: IgnoreParametersOptional parameters to customize which issues to ignore.
import { expect, test } from 'vitest';
import { parse } from './your-langium-test-setup';
test('document has no issues', async () => {
const doc = await parse('const x = 5;');
expect(doc).toHaveNoIssues();
});
test('document has no issues, ignoring lexer errors', async () => {
const doc = await parse('const x = @;', { validation: true });
expect(doc).toHaveNoIssues({ ignoreLexerErrors: true });
});
Expects a Langium document to have no issues after parsing.