chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase

This commit is contained in:
David Snelling 2026-06-11 14:51:00 -07:00
parent 970e08c466
commit 1f7e365a4e
237 changed files with 1951 additions and 49413 deletions

View file

@ -71,12 +71,14 @@ describe('Mutex Safety Tests', () => {
})
it('should not deadlock with nested different keys', async () => {
let innerRan = false
await mutex.runExclusive('key1', async () => {
await mutex.runExclusive('key2', async () => {
// Should not deadlock
expect(true).toBe(true)
innerRan = true
})
})
// Reaching here at all proves no deadlock; assert the inner body ran.
expect(innerRan).toBe(true)
})
it('should handle errors in exclusive function', async () => {
@ -89,9 +91,11 @@ describe('Mutex Safety Tests', () => {
).rejects.toThrow('Test error')
// Lock should be released, so we can acquire it again
let reacquired = false
await mutex.runExclusive('error-test', async () => {
expect(true).toBe(true)
reacquired = true
})
expect(reacquired).toBe(true)
})
it('should handle high concurrency without resource exhaustion', async () => {