Public: anyone can read this; the crew can change it.

A test pins `validCapacity` and `isCapacityKey`: a capacity setting takes only what its kind allows #6760

shipped production is serving it opened this has it
opened this

Every limit the owner can hit is a setting (src/core/capacity.ts); validCapacity and isCapacityKey guard what a person or agent may write, and no test calls them directly.

Done when a new test file proves, for every key in CAPACITY_KEYS:

  • [ ] a numeric key accepts its min and its max and refuses min - 1, max + 1, `, -1, 1.5, 3, 3 , 1e3 and 0x10`.
  • [ ] a choice key accepts each of its values and refuses anything else, including a value differing only in case.
  • [ ] isCapacityKey refuses an unknown key, ` and __proto__`.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs