[IMP] props_validation: have clearer error messages

With this commit, props validation error messages will include a more
developer-friendly error message, avoiding the need to investigate in
the Developer Tools why a complex props structure is invalid.
This commit is contained in:
Paul Morelle
2022-05-12 17:13:54 +02:00
committed by Géry Debongnie
parent c06049076a
commit 940ac64340
3 changed files with 88 additions and 38 deletions
+3 -1
View File
@@ -78,7 +78,9 @@ describe("Portal: Props validation", () => {
error = e;
}
expect(error).toBeDefined();
expect(error.message).toBe(`Invalid Prop 'target' in component 'Portal'`);
expect(error.message).toBe(
"Invalid Prop 'target' in component 'Portal': target is not an instance of String"
);
QWeb.dev = dev;
});