Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  region.test.ts

  Sprache: JAVA
 

import { describe, expect, it } from "vitest";
import { resolveAnthropicVertexRegion, resolveAnthropicVertexRegionFromBaseUrl } from "./api.js";

describe("anthropic vertex region helpers", () => {
  it("accepts well-formed regional env values", () => {
    expect(
      resolveAnthropicVertexRegion({
        GOOGLE_CLOUD_LOCATION: "us-east1",
      } as NodeJS.ProcessEnv),
    ).toBe("us-east1");
  });

  it("falls back to the default region for malformed env values", () => {
    expect(
      resolveAnthropicVertexRegion({
        GOOGLE_CLOUD_LOCATION: "us-central1.attacker.example",
      } as NodeJS.ProcessEnv),
    ).toBe("global");
  });

  it("parses regional Vertex endpoints", () => {
    expect(
      resolveAnthropicVertexRegionFromBaseUrl("https://europe-west4-aiplatform.googleapis.com"),
    ).toBe("europe-west4");
  });

  it("treats the global Vertex endpoint as global", () => {
    expect(resolveAnthropicVertexRegionFromBaseUrl("https://aiplatform.googleapis.com")).toBe(
      "global",
    );
  });

  it("does not infer a Vertex region from custom proxy hosts", () => {
    expect(
      resolveAnthropicVertexRegionFromBaseUrl("https://proxy.example.com/google/aiplatform"),
    ).toBeUndefined();
  });
});

Messung V0.5 in Prozent
C=93 H=100 G=96

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik