Skip to content

Commit cf50b78

Browse files
Claudehotlong
andauthored
Fix app-plugin test to match new manifest service registration
The AppPlugin.init() method now uses the manifest service's register() method instead of ctx.registerService(). Updated the test to properly mock the manifest service and verify the correct behavior. packages/runtime/src/app-plugin.test.ts:46-61 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent b7d64ae commit cf50b78

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

packages/runtime/src/app-plugin.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ describe('AppPlugin', () => {
4949
objects: []
5050
};
5151
const plugin = new AppPlugin(bundle);
52-
52+
53+
// Mock the manifest service
54+
const mockManifestService = { register: vi.fn() };
55+
vi.mocked(mockContext.getService).mockReturnValue(mockManifestService);
56+
5357
await plugin.init(mockContext);
54-
55-
expect(mockContext.registerService).toHaveBeenCalledWith('app.com.test.simple', bundle);
58+
59+
expect(mockContext.getService).toHaveBeenCalledWith('manifest');
60+
expect(mockManifestService.register).toHaveBeenCalledWith(bundle);
5661
});
5762

5863
it('start should do nothing if no runtime hooks', async () => {

0 commit comments

Comments
 (0)