Test that we attach trailing doc comments to enum values
in datamodel. This shows they are parsed, and could potentially be added
to DMMF.
relevant issue:
@@ -81,14 +81,19 @@ fn comments_must_work_in_enums() {
/// Documentation Comment Enum Value 1
USER // Comment on the side
// Comment below
+ PIZZAIOLO /// they make the pizza
}"#;
let schema = parse(dml);
- schema
+ let role_enum = schema
.assert_has_enum("Role")
- .assert_with_documentation("Documentation Comment Enum")
+ .assert_with_documentation("Documentation Comment Enum");
+ role_enum
.assert_has_value("USER")
.assert_with_documentation("Documentation Comment Enum Value 1");
+ role_enum
+ .assert_has_value("PIZZAIOLO")
+ .assert_with_documentation("they make the pizza");
}
#[test]
