chore: make sure to run webview-preload init when running e2e tests (#6842)

* chore: webview-preload init not called on unit tests only

Signed-off-by: Florent Benoit <fbenoit@redhat.com>

---------

Signed-off-by: Ondrej Dockal <odockal@redhat.com>
This commit is contained in:
Ondrej Dockal 2024-04-22 12:42:28 +02:00 committed by GitHub
parent f66a609dd3
commit e7a0b8a4ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,7 @@ export const init = (): void => {
webviewPreload.init().catch((error: unknown) => console.error('Error while initializing the exposure', error));
};
// do not call init methd in case of testing
if (!process.env.VITEST) {
// do not call init method in case of testing
if (import.meta.env.MODE !== 'test') {
init();
}