Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ describe("simple use", () => {
controller.abort();
await expect(lock2Wait).rejects.toThrow(new DOMException("This operation was aborted", "AbortError"));
}
// `signal` only affects the lock acquisition and does not affect the release.
{
const controller = new AbortController();
const signal = controller.signal;
await using lock1 = await request({ signal });
controller.abort();
await expect(lock1.release()).resolves.toBe(true);
}
});
}
{
Expand Down
Loading