How to write unit tests for validator? #1684
Answered
by
msujew
durianwaffle
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Sep 17, 2024
Replies: 1 comment 14 replies
-
Hey @durianwaffle, we export |
Beta Was this translation helpful? Give feedback.
14 replies
Answer selected by
durianwaffle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @durianwaffle,
we export
expectError, expectIssue, expectNoIssues, expectWarning, validationHelper
fromlangium/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