fix: apply 2 pr-agent suggestions

- frontend/src/contexts/EventContext.test.tsx:501 Make the deferred-bootstrap test assert real behavior
- backend/test/services/opencode-single-server.test.ts:352 Restore process env instead of deleting HOME/SHELL

Applied-by: pr-agent-autoapply
This commit is contained in:
lil-worker-cstech[bot] authored and GitHub committed 2026-11-13 06:19:42 +00:00
1 parent b625acfc0c
commit b9ab85d44c
2 files changed
+8 -5

No files matched your search

+4 -2
View File
@@ -499,14 +499,16 @@ afterEach(() => {
describe('EventProvider permissions and forms', () => {
it('defers authenticated bootstrap reads and the event stream until a session exists', async () => {
const api = createApiState()
renderWithProviders(<Harness />, {
const result = renderWithProviders(<Harness />, {
events: true,
auth: 'anonymous',
fetchRoutes: providerRoutes(api),
})
await waitFor(() => expect(screen.getByTestId('count')).toBeInTheDocument())
expect(api.permissions.length).toBe(0)
expect(result.fetchFake.findRequests('GET', '/api/repos')).toHaveLength(0)
expect(result.fetchFake.findRequests('GET', `${localApi}/permission/request`)).toHaveLength(0)
expect(result.eventStream?.openedUrls ?? []).toHaveLength(0)
})
it('syncs missed pending forms for a session', async () => {