From 8be321fd73e3b045ae6d9650def82f570a466fe4 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Mon, 11 May 2026 10:36:53 +0100 Subject: [PATCH] Add `@modules` alias to frontend test module resolver (#33491) GitOrigin-RevId: 929180b0887695b0d04456cfa66ccf87b4cd51c0 --- services/web/test/frontend/bootstrap.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/web/test/frontend/bootstrap.js b/services/web/test/frontend/bootstrap.js index 124d947d86..b8b3f59f31 100644 --- a/services/web/test/frontend/bootstrap.js +++ b/services/web/test/frontend/bootstrap.js @@ -1,7 +1,17 @@ // Run babel on tests to allow support for import/export statements in Node require('@babel/register')({ extensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs'], - plugins: [['module-resolver', { alias: { '^@/(.+)': './frontend/js/\\1' } }]], + plugins: [ + [ + 'module-resolver', + { + alias: { + '^@/(.+)': './frontend/js/\\1', + '^@modules/(.+)': './modules/\\1', + }, + }, + ], + ], }) // Load JSDOM to mock the DOM in Node