Skip to content

Commit

Permalink
Fixed run stream tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ericallam committed Dec 19, 2024
1 parent 85b3605 commit 203d7a0
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/core/test/runStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ class TestStreamSubscriptionFactory implements StreamSubscriptionFactory {
this.streams.set(`${runId}:${streamKey}`, chunks);
}

createSubscription(
metadata: Record<string, unknown>,
runId: string,
streamKey: string
): StreamSubscription {
createSubscription(runId: string, streamKey: string): StreamSubscription {
const chunks = this.streams.get(`${runId}:${streamKey}`) ?? [];
return new TestStreamSubscription(chunks);
}
Expand Down Expand Up @@ -285,13 +281,9 @@ describe("RunSubscription", () => {

// Override createSubscription to count calls
const originalCreate = streamFactory.createSubscription.bind(streamFactory);
streamFactory.createSubscription = (
metadata: Record<string, unknown>,
runId: string,
streamKey: string
) => {
streamFactory.createSubscription = (runId: string, streamKey: string) => {
streamCreationCount++;
return originalCreate(metadata, runId, streamKey);
return originalCreate(runId, streamKey);
};

// Set up test chunks
Expand Down

0 comments on commit 203d7a0

Please sign in to comment.