修复项目切换 manifest 测试竞态
等待 manifest 失效监听注册后再发送失效事件 避免 CI 中测试事件丢失导致超时
This commit is contained in:
@@ -461,6 +461,12 @@ export function registerClientHomeTests() {
|
||||
});
|
||||
fireEvent.click(screen.getByRole('button', { name: '打开' }));
|
||||
await screen.findByLabelText('项目开发工作台');
|
||||
await waitFor(() => {
|
||||
expect(runtimeHarness.listen).toHaveBeenCalledWith(
|
||||
'game-creator-manifest-invalidated',
|
||||
expect.any(Function),
|
||||
);
|
||||
});
|
||||
holdFirstRefresh = true;
|
||||
act(() => {
|
||||
runtimeHarness.emitManifestInvalidated('code-prototype');
|
||||
|
||||
Reference in New Issue
Block a user