* Asserts that the model's response contains every given substring, * ignoring case.
(...substrings: string[])
| 105 | * ignoring case. |
| 106 | */ |
| 107 | assertTextIncludes(...substrings: string[]): void { |
| 108 | const textInLowerCase = this.text.toLowerCase(); |
| 109 | for (const substring of substrings) { |
| 110 | assert.ok( |
| 111 | textInLowerCase.includes(substring.toLowerCase()), |
| 112 | `Expected response to mention '${substring}'. Response: ${this.text}`, |
| 113 | ); |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | export interface TestScenario { |
no outgoing calls
no test coverage detected