fix: add missing hasNativeApiProtocol assertion to native test files

This commit is contained in:
Roo Code 2025-12-30 11:41:34 +00:00
parent 58be120032
commit b9018462f1
3 changed files with 18 additions and 0 deletions

View file

@ -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(

View file

@ -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(

View file

@ -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(