diff --git a/app/views/layout.pug b/app/views/layout.pug
index 986c63ca1..692748d2e 100644
--- a/app/views/layout.pug
+++ b/app/views/layout.pug
@@ -306,20 +306,34 @@ html.h-100.no-js(
if isBot(ctx.get('User-Agent'))
//- lazyload only support for bots
- script(
- defer,
- src=manifest("js/lazyload.js"),
- integrity=manifest("js/lazyload.js", "integrity"),
- crossorigin="anonymous"
- )
+ if config.env === 'test'
+ script(
+ defer,
+ src=`${config.urls.web}/js/lazyload.js`,
+ crossorigin="anonymous"
+ )
+ else
+ script(
+ defer,
+ src=manifest("js/lazyload.js"),
+ integrity=manifest("js/lazyload.js", "integrity"),
+ crossorigin="anonymous"
+ )
else
//- build
- script(
- defer,
- src=manifest("js/build.js"),
- integrity=manifest("js/build.js", "integrity"),
- crossorigin="anonymous"
- )
+ if config.env === 'test'
+ script(
+ defer,
+ src=`${config.urls.web}/js/build.js`,
+ crossorigin="anonymous"
+ )
+ else
+ script(
+ defer,
+ src=manifest("js/build.js"),
+ integrity=manifest("js/build.js", "integrity"),
+ crossorigin="anonymous"
+ )
//- TODO: remove plausible and migrate to our own
//- analytics via plausible.io
diff --git a/test/web/snapshots/index.js.md b/test/web/snapshots/index.js.md
index c8cc6a9e3..f9378a72a 100644
--- a/test/web/snapshots/index.js.md
+++ b/test/web/snapshots/index.js.md
@@ -41,7 +41,7 @@ Generated by [AVA](https://avajs.dev).
window._confirmPromptHTML = "Please confirm if you wish to continue.";␊