From 62b8b4e2ae78480526ce2b48118ae84ca9fe7fca Mon Sep 17 00:00:00 2001 From: VAIO73 <50487331+Vaso73@users.noreply.github.com> Date: Tue, 20 Oct 2026 20:13:12 +0000 Subject: [PATCH] test: load application error translations in panel fixtures --- tests/lxc_updates/test_native_app_discovery_ui.cjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lxc_updates/test_native_app_discovery_ui.cjs b/tests/lxc_updates/test_native_app_discovery_ui.cjs index 5f705d3f..3322b3f1 100644 --- a/tests/lxc_updates/test_native_app_discovery_ui.cjs +++ b/tests/lxc_updates/test_native_app_discovery_ui.cjs @@ -100,6 +100,13 @@ function fixture({nativeCandidate = candidate, dockerCandidate = null, apps = [] if (name === 'react') return react if (name === 'react/jsx-runtime') return {jsx: (type, props) => ({type, props}), jsxs: (type, props) => ({type, props})} if (name.includes('api-config')) return {fetchApi: api} + if (name.includes('lxc-app-editor-errors')) { + const context = {exports: {}} + vm.runInNewContext(ts.transpileModule(fs.readFileSync(path.join(root, 'lib/lxc-app-editor-errors.ts'), 'utf8'), { + compilerOptions: {module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020}, + }).outputText, context) + return context.exports + } if (name.includes('lxc-apps-cache')) return cache if (name.includes('i18n/provider')) return {useT: () => (key, values) => key + (values ? JSON.stringify(values) : '')} if (name.includes('category-color')) return {useIsLightTheme: () => false, categoryChipStyle: () => ({})}