Skip to content

Commit 0b747c2

Browse files
Petrus Pennanenclaude
andcommitted
fix(test): await executeActionForTest after the fail-closed rebase
Rebasing onto main's "fail closed, persist before acting" commit made executeAction (and its executeActionForTest export) async, so this test's four assertions were comparing a Promise's undefined .status instead of the resolved receipt. Await each call. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 9c4cb52 commit 0b747c2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎test/room-automation-mute.test.mjs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ test('the mute gate is exported for testing', () => {
2424
assert.ok(executeActionForTest, 'executeAction must be reachable from a test');
2525
});
2626

27-
test('emergency-only withholds an agent-triggered post', () => {
28-
const r = executeActionForTest(
27+
test('emergency-only withholds an agent-triggered post', async () => {
28+
const r = await executeActionForTest(
2929
{ type: 'post', body: 'chatter' },
3030
{ from: '@somebot', body: 'hi' },
3131
'key', OFFLINE, true,
@@ -35,27 +35,27 @@ test('emergency-only withholds an agent-triggered post', () => {
3535

3636
markSent(); // burn the rate-limit budget: keeps every case below offline
3737

38-
test('emergency-only STILL answers petrus', () => {
39-
const r = executeActionForTest(
38+
test('emergency-only STILL answers petrus', async () => {
39+
const r = await executeActionForTest(
4040
{ type: 'post', body: 'reply' },
4141
{ from: 'petrus', body: '/lead status' },
4242
'key', OFFLINE, true,
4343
);
4444
assert.notEqual(r.status, 'suppressed', 'his own command must always get an answer');
4545
});
4646

47-
test('normal mode posts for everyone (control)', () => {
48-
const r = executeActionForTest(
47+
test('normal mode posts for everyone (control)', async () => {
48+
const r = await executeActionForTest(
4949
{ type: 'post', body: 'chatter' },
5050
{ from: '@somebot', body: 'hi' },
5151
'key', OFFLINE, false,
5252
);
5353
assert.notEqual(r.status, 'suppressed', 'nothing is withheld when not muted');
5454
});
5555

56-
test('the owner match ignores @ and case', () => {
56+
test('the owner match ignores @ and case', async () => {
5757
for (const who of ['@Petrus', 'PETRUS', '@petrus']) {
58-
const r = executeActionForTest(
58+
const r = await executeActionForTest(
5959
{ type: 'post', body: 'reply' }, { from: who, body: 'x' },
6060
'key', { ...OFFLINE, poller: { owner_handle: '@Petrus' } }, true,
6161
);

0 commit comments

Comments
 (0)