summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-03-24 10:56:12 -0700
committerJesse Vincent <jesse@fsck.com>2026-03-25 11:03:53 -0700
commit151cfb16a0901275e493b46fe591f391e91924ea (patch)
tree4d66c9e7071c500460d2ab6d3f3cbfb9c78d8c81 /tests
parenta1155f623fbf9ff321a064fe7a2714ffa68b97fc (diff)
Move brainstorm server metadata to .meta/ subdirectory
Metadata files (.server-info, .events, .server.pid, .server.log, .server-stopped) were stored in the same directory served over HTTP, making them accessible via the /files/ route. They now live in a .meta/ subdirectory that is not web-accessible. Also fixes a stale test assertion ("Waiting for Claude" โ†’ "Waiting for the agent"). Reported-By: ๅ‰็”ฐไป
Diffstat (limited to 'tests')
-rw-r--r--tests/brainstorm-server/server.test.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/brainstorm-server/server.test.js b/tests/brainstorm-server/server.test.js
index d1077a6..2e1f9af 100644
--- a/tests/brainstorm-server/server.test.js
+++ b/tests/brainstorm-server/server.test.js
@@ -103,9 +103,9 @@ async function runTests() {
return Promise.resolve();
});
- await test('writes .server-info file', () => {
- const infoPath = path.join(TEST_DIR, '.server-info');
- assert(fs.existsSync(infoPath), '.server-info should exist');
+ await test('writes .server-info file to .meta/', () => {
+ const infoPath = path.join(TEST_DIR, '.meta', '.server-info');
+ assert(fs.existsSync(infoPath), '.meta/.server-info should exist');
const info = JSON.parse(fs.readFileSync(infoPath, 'utf-8').trim());
assert.strictEqual(info.type, 'server-started');
assert.strictEqual(info.port, TEST_PORT);
@@ -118,7 +118,7 @@ async function runTests() {
await test('serves waiting page when no screens exist', async () => {
const res = await fetch(`http://localhost:${TEST_PORT}/`);
assert.strictEqual(res.status, 200);
- assert(res.body.includes('Waiting for Claude'), 'Should show waiting message');
+ assert(res.body.includes('Waiting for the agent'), 'Should show waiting message');
});
await test('injects helper.js into waiting page', async () => {
@@ -206,9 +206,9 @@ async function runTests() {
ws.close();
});
- await test('writes choice events to .events file', async () => {
+ await test('writes choice events to .meta/.events file', async () => {
// Clean up events from prior tests
- const eventsFile = path.join(TEST_DIR, '.events');
+ const eventsFile = path.join(TEST_DIR, '.meta', '.events');
if (fs.existsSync(eventsFile)) fs.unlinkSync(eventsFile);
const ws = new WebSocket(`ws://localhost:${TEST_PORT}`);
@@ -225,8 +225,8 @@ async function runTests() {
ws.close();
});
- await test('does NOT write non-choice events to .events file', async () => {
- const eventsFile = path.join(TEST_DIR, '.events');
+ await test('does NOT write non-choice events to .meta/.events file', async () => {
+ const eventsFile = path.join(TEST_DIR, '.meta', '.events');
if (fs.existsSync(eventsFile)) fs.unlinkSync(eventsFile);
const ws = new WebSocket(`ws://localhost:${TEST_PORT}`);
@@ -347,9 +347,9 @@ async function runTests() {
ws.close();
});
- await test('clears .events on new screen', async () => {
+ await test('clears .meta/.events on new screen', async () => {
// Create an .events file
- const eventsFile = path.join(TEST_DIR, '.events');
+ const eventsFile = path.join(TEST_DIR, '.meta', '.events');
fs.writeFileSync(eventsFile, '{"choice":"a"}\n');
assert(fs.existsSync(eventsFile));