feat(m1): playable loop — story graph, story panel, queue UI #14

Merged
ginnoir merged 20 commits from feat/m1-playable-loop into main 2026-06-11 19:26:54 -05:00
Showing only changes of commit 96ac4011eb - Show all commits
+7 -4
View File
@@ -367,9 +367,7 @@ describe('applyOutcomes()', () => {
expect(state.storyFlags.visited).toBe(false);
expect(state.resources.coin).toBe(3);
expect(events).toEqual([
{ kind: 'log', nodeId: 'boot_intro', prose: 'A note in the margin.' },
]);
expect(events).toEqual([{ kind: 'log', nodeId: 'boot_intro', prose: 'A note in the margin.' }]);
});
it('throws when consumeResource exceeds balance', () => {
@@ -378,7 +376,12 @@ describe('applyOutcomes()', () => {
state.resources.coin = 1;
expect(() =>
applyOutcomes(state, content, [{ type: 'consumeResource', resourceId: 'coin', amount: 2 }], []),
applyOutcomes(
state,
content,
[{ type: 'consumeResource', resourceId: 'coin', amount: 2 }],
[],
),
).toThrow(/Cannot consume 2 coin/);
});
});