refactor shared flow settings and runtime cleanup
This commit is contained in:
@@ -372,7 +372,7 @@ test('message router re-syncs contribution mode before AUTO_RUN when sidepanel p
|
||||
]);
|
||||
});
|
||||
|
||||
test('message router blocks AUTO_RUN and SCHEDULE_AUTO_RUN when shared auto-run validation fails', async () => {
|
||||
test('message router blocks AUTO_RUN when shared auto-run validation fails', async () => {
|
||||
const source = fs.readFileSync('background/message-router.js', 'utf8');
|
||||
const globalScope = {};
|
||||
const api = new Function('self', `${source}; return self.MultiPageBackgroundMessageRouter;`)(globalScope);
|
||||
@@ -388,10 +388,6 @@ test('message router blocks AUTO_RUN and SCHEDULE_AUTO_RUN when shared auto-run
|
||||
stepStatuses: {},
|
||||
}),
|
||||
normalizeRunCount: (value) => Number(value) || 1,
|
||||
scheduleAutoRun: async () => {
|
||||
calls.push({ type: 'scheduleAutoRun' });
|
||||
return { ok: true };
|
||||
},
|
||||
setState: async (updates) => {
|
||||
calls.push({ type: 'setState', updates });
|
||||
},
|
||||
@@ -415,19 +411,6 @@ test('message router blocks AUTO_RUN and SCHEDULE_AUTO_RUN when shared auto-run
|
||||
}),
|
||||
/当前 flow 不支持手机号注册。/
|
||||
);
|
||||
|
||||
await assert.rejects(
|
||||
() => router.handleMessage({
|
||||
type: 'SCHEDULE_AUTO_RUN',
|
||||
payload: {
|
||||
totalRuns: 2,
|
||||
delayMinutes: 5,
|
||||
autoRunSkipFailures: false,
|
||||
},
|
||||
}),
|
||||
/当前 flow 不支持手机号注册。/
|
||||
);
|
||||
|
||||
assert.deepStrictEqual(calls, []);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user