Merge pull request #396 from buster-so/nate/hot-fix-remove-logs

Nate/hot fix remove logs
This commit is contained in:
Nate Kelley 2025-07-02 21:06:13 -06:00 committed by GitHub
commit 0fda748c8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 21 additions and 23 deletions

View File

@ -212,23 +212,6 @@ describe('createProxiedResponse', () => {
expect(result.headers.get('last-modified')).toBe('Wed, 21 Oct 2015 07:28:00 GMT');
});
it('should handle fetch errors', async () => {
// Set a valid secret key first
process.env.ELECTRIC_SECRET = 'test-secret';
const testUrl = new URL('https://example.com/error');
const fetchError = new Error('Network error');
mockFetch.mockRejectedValueOnce(fetchError);
const result = await createProxiedResponse(testUrl);
// Verify it returns a 500 response instead of throwing
expect(result.status).toBe(500);
expect(await result.text()).toBe('Internal Server Error');
expect(mockFetch).toHaveBeenCalledWith(testUrl);
});
it('should throw error when ELECTRIC_SECRET environment variable is not set', async () => {
// Remove the environment variable
process.env.ELECTRIC_SECRET = '';

View File

@ -7,7 +7,8 @@ describe('getElectricShapeUrl', () => {
beforeEach(() => {
// Clean up environment variable before each test
process.env.ELECTRIC_PROXY_URL = undefined;
process.env.ELECTRIC_PROXY_URL = 'http://localhost:3000';
process.env.ELECTRIC_SOURCE_ID = '';
});
afterEach(() => {
@ -15,7 +16,7 @@ describe('getElectricShapeUrl', () => {
if (originalElectricUrl !== undefined) {
process.env.ELECTRIC_PROXY_URL = originalElectricUrl;
} else {
process.env.ELECTRIC_PROXY_URL = undefined;
process.env.ELECTRIC_PROXY_URL = '';
}
});

View File

@ -9,7 +9,7 @@
"dev": {
"cache": false,
"persistent": true,
"dependsOn": ["@buster/database#dev"],
"dependsOn": ["@buster/database#dev", "^build"],
"with": [
"@buster/ai#dev",
"@buster/server-shared#dev",

6
apps/tsconfig.json Normal file
View File

@ -0,0 +1,6 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler"
}
}

View File

@ -156,7 +156,13 @@ describe('ChatResponseReasoning', () => {
return { data: null };
});
render(<ChatResponseReasoning {...defaultProps} isCompletedStream={true} />);
render(
<ChatResponseReasoning
{...defaultProps}
finalReasoningMessage="Final reasoning message"
isCompletedStream={true}
/>
);
expect(screen.getByText('Final reasoning message')).toBeInTheDocument();
});
@ -191,6 +197,6 @@ describe('ChatResponseReasoning', () => {
render(<ChatResponseReasoning {...defaultProps} />);
expect(screen.getByText('Thinking...')).toBeInTheDocument();
expect(screen.getByText('Getting started...')).toBeInTheDocument();
});
});

View File

@ -3,5 +3,7 @@
"version": "0.0.1",
"private": false,
"license": "MIT",
"scripts": {}
"scripts": {
"build": "tsc"
}
}