Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Feed the database sync test a Buffer dump stream like the real file

Claude9574ac564a6b
diff --git a/server/routes/database.test.js b/server/routes/database.test.js
index 86057bf3bc..3e576d70ad 100644
--- a/server/routes/database.test.js
+++ b/server/routes/database.test.js
@@ -742,7 +742,7 @@ describe('POST /api/database/sync endpoint safety', () => {
async (mode, port, targetPort) => {
POOL_CONFIG.port = port;
const mkdir = vi.spyOn(await import('fs'), 'mkdirSync').mockImplementation(() => undefined);
- createReadStream.mockImplementationOnce(() => Readable.from(['SELECT 1;\n']));
+ createReadStream.mockImplementationOnce(() => Readable.from([Buffer.from('SELECT 1;\n')]));
execFile.mockImplementation((_cmd, args, _opts, callback) => {
callback(null, args.includes('status') ? `Current mode: ${mode}` : '1', '');
});