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


Quelle  connect-error.node.test.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

// @vitest-environment node
import { describe, expect, it } from "vitest";
import { formatConnectError } from "./connect-error.ts";

describe("formatConnectError", () => {
  it("formats pairing scope upgrades with the richer contract", () => {
    expect(
      formatConnectError({
        message: "pairing required: device is asking for more scopes than currently approved",
        details: {
          code: "PAIRING_REQUIRED",
          reason: "scope-upgrade",
          requestId: "req-123",
        },
      }),
    ).toBe("gateway pairing required: device is asking for more scopes than currently approved");
  });

  it("formats unapproved devices with the richer contract", () => {
    expect(
      formatConnectError({
        message: "pairing required: device is not approved yet",
        details: {
          code: "PAIRING_REQUIRED",
          reason: "not-paired",
        },
      }),
    ).toBe("gateway pairing required: device is not approved yet");
  });

  it("preserves surfaced pending approvals", () => {
    expect(
      formatConnectError({
        message: "scope upgrade pending approval (requestId: req-123)",
        details: {
          code: "PAIRING_REQUIRED",
          reason: "scope-upgrade",
          requestId: "req-123",
        },
      }),
    ).toBe("scope upgrade pending approval (requestId: req-123)");
  });
});

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge