This commit is contained in:
@@ -23,7 +23,9 @@ function load(path, mocks = {}, exportName = 'default', extra = '') {
|
||||
compileFunction(output + extra, ['require', 'module', 'exports'])(
|
||||
(name) =>
|
||||
mocks[name] ??
|
||||
(name.startsWith('@/') ? { default: () => null } : require(name)),
|
||||
(name === '@/components/investment-step-help'
|
||||
? { HelpAtStep: () => null, InvestmentHelpGuide: ({ children }) => children }
|
||||
: name.startsWith('@/') ? { default: () => null } : require(name)),
|
||||
module,
|
||||
module.exports,
|
||||
);
|
||||
@@ -508,7 +510,7 @@ function contextPreviewHarness(overrides = {}) {
|
||||
const pending = [];
|
||||
const Editor = load('../../resources/js/pages/investor-path/context.tsx', {
|
||||
react: hooks,
|
||||
'@inertiajs/react': { Link: () => null, router: {} },
|
||||
'@inertiajs/react': { usePage: () => ({ props: { auth: { user: { id: 1 } } } }), Link: () => null, router: {} },
|
||||
'@/components/navigation-context': {
|
||||
useNavigationContext: () => ({ refresh() {} }),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user