Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Oct 6, 2023
1 parent ad7ea34 commit 02687fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/async/deserializeAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ export function createTsonParseAsyncInner(opts: TsonAsyncOptions) {
item.controller.close();
}

assert(streamByIndex.size === 0, "Not all streams were closed");
assert(
streamByIndex.size === 0,
"Not all streams were processed or done at the end of the stream",
);
}

async function init() {
Expand Down
1 change: 0 additions & 1 deletion src/handlers/tsonAsyncIterable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const tsonAsyncIterator: TsonAsyncType<

case ITERATOR_VALUE: {
yield value[1];
break;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,6 @@ test("async: bad values", async () => {
});

expect(onErrorSpy.mock.calls[0][0]).toMatchInlineSnapshot(
'[TsonError: Stream interrupted: Not all streams were closed]',
'[TsonError: Stream interrupted: Not all streams were processed or done at the end of the stream]',
);
});

0 comments on commit 02687fb

Please sign in to comment.