/**
 * @license
 * Copyright The Closure Library Authors.
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @fileoverview This module simplifies testing code which uses stateful
 * singletons. `goog.testing.singleton.reset` resets all instances, so
 * next time when `getInstance` is called, a new instance is created.
 * It's recommended to reset the singletons in `tearDown` to prevent
 * interference between subsequent tests.
 *
 * The `goog.testing.singleton` functions expect that the goog.DEBUG flag
 * is enabled, and the tests are either uncompiled or compiled without renaming.
 */

goog.setTestOnly('goog.testing.singleton');
goog.provide('goog.testing.singleton');


/**
 * Deletes all singleton instances, so `getInstance` will return a new
 * instance on next call.
 */
goog.testing.singleton.reset = function() {
  const singletons = goog.getObjectByName('goog.instantiatedSingletons_');
  let ctor;
  while (ctor = singletons.pop()) {
    delete ctor.instance_;
  }
};


/**
 * @deprecated Please use `goog.addSingletonGetter`.
 */
goog.testing.singleton.addSingletonGetter = goog.addSingletonGetter;

@@ -672,17 +672,16 @@
 ton');%0A%0A
-%0A
 /**%0A * D
@@ -773,16 +773,26 @@
 t call.%0A
+ * @const%0A
  */%0Agoog
@@ -815,16 +815,19 @@
 on.reset
+All
  = funct
@@ -992,16 +992,196 @@
   %7D%0A%7D;%0A%0A
+/**%0A * Deletes all singleton instances, so %60getInstance%60 will return a new%0A * instance on next call.%0A * @const%0A */%0Agoog.testing.singleton.reset = goog.testing.singleton.resetAll;%0A%0A
 %0A/**%0A * 

Add a new method goog.testing.singleton.resetAll that currently maps to the existing goog.testing.singleton.reset method. RELNOTES: Rename goog.testing.singleton.reset to goog.testing.singleton.resetAll