add_setup(async function () {
await ExperimentAPI.ready();
await resetRemoteSettingsCollections();
const sandbox = sinon.createSandbox();
/* We stub the functions that operate with enrollments and remote rollouts *sothatanyaccesstostoresomethingisimplicitlyvalidatedagainst *theschemaandnorecordshavemissing(orextra)propertieswhileintests
*/
// Ensure the inner callback runs after all other registered cleanup // functions. This lets tests use registerCleanupFunction to clean up any // stray enrollments.
registerCleanupFunction(() => {
registerCleanupFunction(async () => {
await NimbusTestUtils.assert.storeIsEmpty(ExperimentAPI.manager.store);
await resetRemoteSettingsCollections();
sandbox.restore();
});
});
});
async function setupTest() { return async function cleanup() {
await NimbusTestUtils.removeStore(ExperimentAPI.manager.store);
};
}
// We can't return promise here because JavaScript will collapse it and // awaiting this function will await *that* promise, which we don't want to // do. return { promise };
}
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.