Test an array to start with a specific value. The value is tested by identity, not structure. @param searchElement - The value that should be the start of the array.
(searchElement: T)
| 57 | @param searchElement - The value that should be the start of the array. |
| 58 | */ |
| 59 | startsWith(searchElement: T): this { |
| 60 | return this.addValidator({ |
| 61 | message: (value, label) => `Expected ${label} to start with \`${searchElement}\`, got \`${value[0]}\``, |
| 62 | validator: value => value[0] === searchElement, |
| 63 | }); |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | Test an array to end with a specific value. The value is tested by identity, not structure. |
no test coverage detected