[IMP] component,qweb: props validation

We re-add the possibility to validate props when dev mode is active.
No change in the API right Now. The dev mode is activated via the
configure method of App class.
This commit is contained in:
Mathieu Duckerts-Antoine
2021-10-20 16:08:31 +02:00
committed by Géry Debongnie
parent d1425c7100
commit 6e0834ce5e
15 changed files with 1308 additions and 714 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ describe("Asyncroot", () => {
</AsyncRoot>
</div>
</div>`;
static components = { Child, AsyncChild, /*AsyncRoot*/ };
static components = { Child, AsyncChild /*AsyncRoot*/ };
state = useState({ val: 0 });
updateApp() {
@@ -79,7 +79,7 @@ describe("Asyncroot", () => {
<AsyncChild val="state.val"/>
</div>
</div>`;
static components = { Child, AsyncChild, /*AsyncRoot*/ };
static components = { Child, AsyncChild /*AsyncRoot*/ };
state = useState({ val: 0 });
updateApp() {
@@ -132,7 +132,7 @@ describe("Asyncroot", () => {
</AsyncRoot>
</div>
</div>`;
static components = { Child, AsyncChild, /*AsyncRoot*/ };
static components = { Child, AsyncChild /*AsyncRoot*/ };
state = useState({ val: 0 });
updateApp() {
+2 -1
View File
@@ -405,7 +405,8 @@ describe("Portal", () => {
error = e;
}
expect(error).toBeDefined();
const regexp = /Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g
const regexp =
/Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
expect(error.message).toMatch(regexp);
});