Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Test the live updates stream (/api/events)

オープン 初心者向け
#16 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
backend, testing

調査の方向性

apps/api/src/routes.tsでbroadcast()と/api/eventsルートを確認し、続いてClientクラスとtests/api.test.mjsにある既存のAPIテストパターンを調べてください。未認証アクセス、incidentの更新、playbookの保存をカバーするテストを追加してください。各ストリームをreaderで読み取り、キャンセルしてnpm testが終了するようにしてください。期待されるイベント型とincident idが検証され、npm testが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

good first issue help wanted
The task

When someone changes a playbook or an incident, everyone sees it live: the browser keeps GET /api/events open, a Server-Sent Events stream, and the server pushes an event on every change. Nothing tests this stream. Add a test, so that a change to the server cannot silently stop live updates.

Where to look
  • apps/api/src/routes.ts: broadcast() near the top writes event: change with { type, id } as data; the /api/events route needs a signed-in user (role viewer)
  • tests/api.test.mjs: the Client class keeps the session cookie. fetch can read a stream: read res.body with a reader and split the text on blank lines (\n\n), each block is one event

Cancel the reader at the end of the test, or the test run will not exit.

Done when
  • Opening /api/events without a session gets 401
  • With a session, after an analyst changes an incident (for example its name, POST /api/incidents/:id/meta), an event: change arrives with type incident and the incident's id
  • After an editor saves a playbook draft, an event arrives with type playbook
  • npm test passes, and exits on its own
Mentor

@0b3l1X-SolidGeeks

主要言語
TypeScript
スター
0
フォーク
1
平均マージ
9分
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SolidGeeks/muster のほかの issue

SolidGeeks/muster の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。