mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: add missing hasNativeApiProtocol assertion to native test files
This commit is contained in:
parent
58be120032
commit
b9018462f1
3 changed files with 18 additions and 0 deletions
|
|
@ -44,6 +44,12 @@ function createVerificationState(): NativeProtocolVerification {
|
|||
function assertNativeProtocolUsed(verification: NativeProtocolVerification, testName: string): void {
|
||||
assert.ok(verification.apiProtocol !== null, `[${testName}] apiProtocol should be set in api_req_started message.`)
|
||||
|
||||
assert.strictEqual(
|
||||
verification.hasNativeApiProtocol,
|
||||
true,
|
||||
`[${testName}] Native API protocol should be used. Expected apiProtocol to be "anthropic" or "openai", but got: ${verification.apiProtocol}`,
|
||||
)
|
||||
|
||||
assert.strictEqual(verification.responseIsNotXML, true, `[${testName}] Response should NOT contain XML tool tags.`)
|
||||
|
||||
assert.strictEqual(
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ function createVerificationState(): NativeProtocolVerification {
|
|||
function assertNativeProtocolUsed(verification: NativeProtocolVerification, testName: string): void {
|
||||
assert.ok(verification.apiProtocol !== null, `[${testName}] apiProtocol should be set in api_req_started message.`)
|
||||
|
||||
assert.strictEqual(
|
||||
verification.hasNativeApiProtocol,
|
||||
true,
|
||||
`[${testName}] Native API protocol should be used. Expected apiProtocol to be "anthropic" or "openai", but got: ${verification.apiProtocol}`,
|
||||
)
|
||||
|
||||
assert.strictEqual(verification.responseIsNotXML, true, `[${testName}] Response should NOT contain XML tool tags.`)
|
||||
|
||||
assert.strictEqual(
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ function createVerificationState(): NativeProtocolVerification {
|
|||
function assertNativeProtocolUsed(verification: NativeProtocolVerification, testName: string): void {
|
||||
assert.ok(verification.apiProtocol !== null, `[${testName}] apiProtocol should be set in api_req_started message.`)
|
||||
|
||||
assert.strictEqual(
|
||||
verification.hasNativeApiProtocol,
|
||||
true,
|
||||
`[${testName}] Native API protocol should be used. Expected apiProtocol to be "anthropic" or "openai", but got: ${verification.apiProtocol}`,
|
||||
)
|
||||
|
||||
assert.strictEqual(verification.responseIsNotXML, true, `[${testName}] Response should NOT contain XML tool tags.`)
|
||||
|
||||
assert.strictEqual(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue