       assert.isUndefined(result);
          assert.isUndefined(expectedUnit);  // Test sanity check.
        } else {
          assert.instanceOf(result, Scalar);
          assert.strictEqual(result.value, expectedValue);
          assert.strictEqual(result.unit, expectedUnit);
        }
      }

      // Without model parameter.
      const result1 = MemoryAllocatorDump.aggregateNumerics(numerics);
      checkResult(result1);

      // With model parameter.
      const mockModel = {
        warnings: [],
