fix: isolate WeChat runtime delivery path
This commit is contained in:
@@ -97,6 +97,7 @@ function createSetup(overrides = {}) {
|
||||
const options = {
|
||||
pool,
|
||||
h5Root: '/app',
|
||||
codeRoot: '/runtime',
|
||||
env: {
|
||||
H5_SCHEDULE_ENABLED: '1',
|
||||
H5_REMINDER_WORKER_ENABLED: '1',
|
||||
@@ -236,6 +237,10 @@ test('preserves WeChat service configuration and proxy callbacks', async () => {
|
||||
);
|
||||
const { wechatOptions } = setup.getCaptured();
|
||||
|
||||
assert.deepEqual(
|
||||
setup.calls.find(([kind]) => kind === 'load-wechat'),
|
||||
['load-wechat', '/runtime'],
|
||||
);
|
||||
assert.equal(
|
||||
wechatOptions.pageDataFinishGuard,
|
||||
setup.options.mindSpacePublicFinish,
|
||||
@@ -268,6 +273,18 @@ test('preserves WeChat service configuration and proxy callbacks', async () => {
|
||||
}),
|
||||
{ sessionId: 'session-1' },
|
||||
);
|
||||
assert.deepEqual(
|
||||
setup.calls.find(([kind]) => kind === 'start-session'),
|
||||
[
|
||||
'start-session',
|
||||
'user-1',
|
||||
{
|
||||
workingDir: '/workspace',
|
||||
sessionPolicy: { sandboxed: true },
|
||||
origin: 'wechat',
|
||||
},
|
||||
],
|
||||
);
|
||||
assert.deepEqual(
|
||||
await wechatOptions.sessionApiFetch(
|
||||
'session-1',
|
||||
|
||||
Reference in New Issue
Block a user