Skip to content

How to write unit tests for validator? #1684

Answered by msujew
durianwaffle asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @durianwaffle,

we export expectError, expectIssue, expectNoIssues, expectWarning, validationHelper from langium/test that should help you to write validation tests. See also our own validation tests:

https://github.com/eclipse-langium/langium/blob/main/packages/langium/test/grammar/grammar-validator.test.ts

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@msujew
Comment options

@msujew
Comment options

@durianwaffle
Comment options

@msujew
Comment options

@durianwaffle
Comment options

Answer selected by durianwaffle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants