Refuse a bind bound() cannot record, and document it for a 0.4.0 consumer
Mirror / push (push) Successful in 6s
Test / lint (pull_request) Successful in 23s
Test / test (18) (pull_request) Successful in 31s
Test / test (20) (pull_request) Successful in 45s
Test / test (22) (pull_request) Successful in 32s
Test / test (24) (pull_request) Successful in 31s
Test / test (26) (pull_request) Successful in 32s

This commit is contained in:
2026-09-28 04:01:51 +02:00
parent 3cc38325cc
commit 2ac72fb3f4
8 changed files with 51 additions and 19 deletions
+1 -1
View File
@@ -465,7 +465,7 @@ describe('bind', () => {
// The mistakes an untyped caller makes: the TLV object for its value, a version past int8, a typo.
for (const [bindType, declared] of [['receiver', { tagValue: 0x34 }], ['receiver', 0x100], ['receiver', 3.4], ['tx', 0x34]]) {
const refused: unknown = Reflect.apply(session.bound, session, [bindType, declared]);
const refused: unknown = Reflect.apply(Reflect.get(session, 'bound'), session, [bindType, declared]);
assert.ok(refused && typeof refused === 'object' && 'err' in refused && refused.err instanceof Error);
}