Skip to content

Commit 6f9dd97

Browse files
committed
Stabilize PR guard validation tests
1 parent 5518357 commit 6f9dd97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/gateway-core/test/event-audit.test.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ test("gateway event audit writes dispatch entries when enabled", async () => {
1818
const lines = readFileSync(auditPath, "utf-8")
1919
.split(/\r?\n/)
2020
.filter(Boolean)
21+
.map((line) => JSON.parse(line))
2122
assert.ok(lines.length >= 1)
22-
const first = JSON.parse(lines[0])
23-
assert.equal(first.reason_code, "event_dispatch")
24-
assert.equal(first.event_type, "session.idle")
23+
const dispatch = lines.find((entry) => entry.reason_code === "event_dispatch")
24+
assert.equal(dispatch?.event_type, "session.idle")
2525
} finally {
2626
if (previous === undefined) {
2727
delete process.env.MY_OPENCODE_GATEWAY_EVENT_AUDIT

0 commit comments

Comments
 (0)