Test an array buffer to have a minimum byte length. @param byteLength - The minimum byte length of the array buffer.
(byteLength: number)
| 29 | @param byteLength - The minimum byte length of the array buffer. |
| 30 | */ |
| 31 | minByteLength(byteLength: number): this { |
| 32 | return this.addValidator({ |
| 33 | message: (value, label) => `Expected ${label} to have a minimum byte length of \`${byteLength}\`, got \`${value.byteLength}\``, |
| 34 | validator: value => value.byteLength >= byteLength, |
| 35 | negatedMessage: (value, label) => `Expected ${label} to have a maximum byte length of \`${byteLength - 1}\`, got \`${value.byteLength}\``, |
| 36 | }); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | Test an array buffer to have a minimum byte length. |
nothing calls this directly
no test coverage detected