diff --git a/src/app/app.ts b/src/app/app.ts index 38d753bd..d0c7714e 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -18,10 +18,14 @@ export interface AppConfig extends TemplateSetConfig { test?: boolean; } -export const DEV_MSG = `Owl is running in 'dev' mode. +export const DEV_MSG = () => { + const hash = (window as any).owl ? (window as any).owl.__info__.hash : "master"; + + return `Owl is running in 'dev' mode. This is not suitable for production use. -See https://github.com/odoo/owl/blob/master/doc/reference/config.md#mode for more information.`; +See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration for more information.`; +}; export class App< T extends abstract new (...args: any) => any = any, @@ -43,7 +47,7 @@ export class App< this.dev = true; } if (this.dev && !config.test) { - console.info(DEV_MSG); + console.info(DEV_MSG()); } const descrs = Object.getOwnPropertyDescriptors(config.env || {}); this.env = Object.freeze(Object.defineProperties({}, descrs)) as E; diff --git a/tests/components/props_validation.test.ts b/tests/components/props_validation.test.ts index 8247d05d..c0369943 100644 --- a/tests/components/props_validation.test.ts +++ b/tests/components/props_validation.test.ts @@ -12,7 +12,7 @@ let mockConsoleWarn: any; beforeAll(() => { console.info = (message: any) => { - if (message === DEV_MSG) { + if (message === DEV_MSG()) { return; } info(message); diff --git a/tests/misc/portal.test.ts b/tests/misc/portal.test.ts index 1f698351..08436b8e 100644 --- a/tests/misc/portal.test.ts +++ b/tests/misc/portal.test.ts @@ -29,7 +29,7 @@ snapshotEverything(); beforeAll(() => { console.info = (message: any) => { - if (message === DEV_MSG) { + if (message === DEV_MSG()) { return; } info(message);