Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  head.js

  Sprache: JAVA
 

"use strict";
// Globals

const { sinon } = ChromeUtils.importESModule(
  "resource://testing-common/Sinon.sys.mjs"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
  "resource://gre/modules/XPCOMUtils.sys.mjs"
);
ChromeUtils.defineESModuleGetters(this, {
  ExperimentFakes: "resource://testing-common/NimbusTestUtils.sys.mjs",
  ExperimentTestUtils: "resource://testing-common/NimbusTestUtils.sys.mjs",
  ObjectUtils: "resource://gre/modules/ObjectUtils.sys.mjs",
  RegionTestUtils: "resource://testing-common/RegionTestUtils.sys.mjs",
});

RegionTestUtils.setNetworkRegion("US");

// Sinon does not support Set or Map in spy.calledWith()
function onFinalizeCalled(spyOrCallArgs, ...expectedArgs) {
  function mapToObject(map) {
    return Object.assign(
      {},
      ...Array.from(map.entries()).map(([k, v]) => ({ [k]: v }))
    );
  }

  function toPlainObjects(args) {
    return [
      args[0],
      {
        ...args[1],
        invalidBranches: mapToObject(args[1].invalidBranches),
        invalidFeatures: mapToObject(args[1].invalidFeatures),
        missingLocale: Array.from(args[1].missingLocale),
        missingL10nIds: mapToObject(args[1].missingL10nIds),
      },
    ];
  }

  const plainExpected = toPlainObjects(expectedArgs);

  if (Array.isArray(spyOrCallArgs)) {
    return ObjectUtils.deepEqual(toPlainObjects(spyOrCallArgs), plainExpected);
  }

  for (const args of spyOrCallArgs.args) {
    if (ObjectUtils.deepEqual(toPlainObjects(args), plainExpected)) {
      return true;
    }
  }

  return false;
}

/**
 * Assert the store has no active experiments or rollouts.
 */

async function assertEmptyStore(store, { cleanup = false } = {}) {
  Assert.deepEqual(
    store
      .getAll()
      .filter(e => e.active)
      .map(e => e.slug),
    [],
    "Store should have no active enrollments"
  );

  store
    .getAll()
    .filter(e => !e.active)
    .forEach(e => store._deleteForTests(e.slug));

  Assert.deepEqual(
    store
      .getAll()
      .filter(e => !e.active)
      .map(e => e.slug),
    [],
    "Store should have no inactive enrollments"
  );

  if (cleanup) {
    // We need to call finalize first to ensure that any pending saves from
    // JSONFile.saveSoon overwrite files on disk.
    store._store.saveSoon();
    await store._store.finalize();
    await IOUtils.remove(store._store.path);
  }
}

Messung V0.5 in Prozent
C=89 H=90 G=89

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-05) ¤

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