Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  qa-lab.test.ts

  Sprache: JAVA
 

import { beforeEach, describe, expect, it, vi } from "vitest";

const loadBundledPluginPublicSurfaceModuleSync = vi.hoisted(() => vi.fn());
const registerQaLabCliImpl = vi.hoisted(() => vi.fn());
const isQaLabCliAvailableImpl = vi.hoisted(() => vi.fn());

vi.mock("./facade-loader.js", async () => {
  const actual = await vi.importActual<typeof import("./facade-loader.js")>("./facade-loader.js");
  return {
    ...actual,
    loadBundledPluginPublicSurfaceModuleSync,
  };
});

describe("plugin-sdk qa-lab", () => {
  beforeEach(() => {
    registerQaLabCliImpl.mockReset();
    isQaLabCliAvailableImpl.mockReset().mockReturnValue(true);
    loadBundledPluginPublicSurfaceModuleSync.mockReset().mockReturnValue({
      isQaLabCliAvailable: isQaLabCliAvailableImpl,
      registerQaLabCli: registerQaLabCliImpl,
    });
  });

  it("keeps the qa-lab facade cold until used", async () => {
    const module = await import("./qa-lab.js");

    expect(loadBundledPluginPublicSurfaceModuleSync).not.toHaveBeenCalled();
    module.registerQaLabCli({} as never);
    expect(loadBundledPluginPublicSurfaceModuleSync).toHaveBeenCalledWith({
      dirName: "qa-lab",
      artifactBasename: "cli.js",
    });
  });

  it("delegates qa cli registration through the bundled public surface", async () => {
    const module = await import("./qa-lab.js");

    module.registerQaLabCli({} as never);
    expect(registerQaLabCliImpl).toHaveBeenCalledWith({} as never);
  });

  it("delegates qa cli availability through the bundled public surface", async () => {
    const module = await import("./qa-lab.js");

    expect(module.isQaLabCliAvailable()).toBe(true);
    expect(isQaLabCliAvailableImpl).toHaveBeenCalled();
  });

  it("reports qa-lab unavailable when private facade artifacts are not packed", async () => {
    loadBundledPluginPublicSurfaceModuleSync.mockImplementation(() => {
      throw new Error("Unable to resolve bundled plugin public surface qa-lab/cli.js");
    });
    const module = await import("./qa-lab.js");

    expect(module.isQaLabCliAvailable()).toBe(false);
  });
});

Messung V0.5 in Prozent
C=99 H=96 G=97

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© 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