function checkLog(aExpected) {
		var aLogEntries = Log.getLogEntries(),
			iStartIndex = Opa.getContext().iNextLogIndex || 0;

		function isExpected(oLog) {
			if (!aExpected) {
				return false;
			}
			return aExpected.some(function (oExpected, i) {
				if (oLog.component === oExpected.component
						&& oLog.level === oExpected.level
						&& matches(oLog.message, oExpected.message)
						&& (!oExpected.details || matches(oLog.details, oExpected.details))) {
					aExpected.splice(i, 1);
					return true;
				}
			});
		}

		function matches(sActual, vExpected) {
			return vExpected instanceof RegExp
				? vExpected.test(sActual)
				: sActual.includes(vExpected);
		}

		function replacer(_sKey, vValue) {
			return vValue instanceof RegExp ? vValue.toString() : vValue;
		}

		Opa.getContext().iNextLogIndex = aLogEntries.length;
		aLogEntries.splice(iStartIndex).forEach(function (oLog) {
			var sComponent = oLog.component || "";

			if (Helper.isRelevantLog(oLog)) {
				if (isExpected(oLog)) {
					Opa5.assert.ok(true,
						"Expected Warning or error found: " + sComponent
						+ " Level: " + oLog.level
						+ " Message: " + oLog.message
						+ (oLog.details ? " Details: " + oLog.details : ""));
				} else {
					Opa5.assert.ok(false,
						"Unexpected warning or error found: " + sComponent
						+ " Level: " + oLog.level
						+ " Message: " + oLog.message
						+ (oLog.details ? " Details: " + oLog.details : "")
						+ "\r\nExpected one of: " + JSON.stringify(aExpected, replacer, "\t"));
				}
			}
		});
		if (aExpected) {
			aExpected.forEach(function (oExpected) {
				if (Log.isLoggable(oExpected.level, oExpected.component)) {
					Opa5.assert.ok(false,
						"Expected warning or error not logged: " + oExpected.component
						+ " Level: " + oExpected.level
						+ " Message: " + oExpected.message
						+ (oExpected.details ? " Details: " + oExpected.details : ""));
				}
			});
		}
		Opa5.assert.ok(true, "Log checked");
	}
/*
	 * checks that console log is clean, or only has <code>aExpected</code> log entries
	 *
	 * @param {object[]} [aExpected]
	 *  An array of log entries that are expected {@link Log.getLogEntries}
	 */
checks that console log is clean, or only has aExpected log entries
@param {object[]} [aExpected]
An array of log entries that are expected  Log.getLogEntries
checks that console log is clean or only has aExpected log entries @param { object [] } [ aExpected ] An array of log entries that are expected Log . getLogEntries
function checkLog(aExpected) {
		var aLogEntries = Log.getLogEntries(),
			iStartIndex = Opa.getContext().iNextLogIndex || 0;
		function isExpected(oLog) {
			if (!aExpected) {
				return false;
			}
			return aExpected.some(function (oExpected, i) {
				if (oLog.component === oExpected.component
						&& oLog.level === oExpected.level
						&& matches(oLog.message, oExpected.message)
						&& (!oExpected.details || matches(oLog.details, oExpected.details))) {
					aExpected.splice(i, 1);
					return true;
				}
			});
		}
		function matches(sActual, vExpected) {
			return vExpected instanceof RegExp
				? vExpected.test(sActual)
				: sActual.includes(vExpected);
		}
		function replacer(_sKey, vValue) {
			return vValue instanceof RegExp ? vValue.toString() : vValue;
		}
		Opa.getContext().iNextLogIndex = aLogEntries.length;
		aLogEntries.splice(iStartIndex).forEach(function (oLog) {
			var sComponent = oLog.component || "";
			if (Helper.isRelevantLog(oLog)) {
				if (isExpected(oLog)) {
					Opa5.assert.ok(true,
						"Expected Warning or error found: " + sComponent
						+ " Level: " + oLog.level
						+ " Message: " + oLog.message
						+ (oLog.details ? " Details: " + oLog.details : ""));
				} else {
					Opa5.assert.ok(false,
						"Unexpected warning or error found: " + sComponent
						+ " Level: " + oLog.level
						+ " Message: " + oLog.message
						+ (oLog.details ? " Details: " + oLog.details : "")
						+ "\r\nExpected one of: " + JSON.stringify(aExpected, replacer, "\t"));
				}
			}
		});
		if (aExpected) {
			aExpected.forEach(function (oExpected) {
				if (Log.isLoggable(oExpected.level, oExpected.component)) {
					Opa5.assert.ok(false,
						"Expected warning or error not logged: " + oExpected.component
						+ " Level: " + oExpected.level
						+ " Message: " + oExpected.message
						+ (oExpected.details ? " Details: " + oExpected.details : ""));
				}
			});
		}
		Opa5.assert.ok(true, "Log checked");
	}
function checkLog ( aExpected ) { var aLogEntries = Log . getLogEntries ( ) , iStartIndex = Opa . getContext ( ) . iNextLogIndex || 0 ; function isExpected ( oLog ) { if ( ! aExpected ) { return false ; } return aExpected . some ( function ( oExpected , i ) { if ( oLog . component === oExpected . component && oLog . level === oExpected . level && matches ( oLog . message , oExpected . message ) && ( ! oExpected . details || matches ( oLog . details , oExpected . details ) ) ) { aExpected . splice ( i , 1 ) ; return true ; } } ) ; } function matches ( sActual , vExpected ) { return vExpected instanceof RegExp ? vExpected . test ( sActual ) : sActual . includes ( vExpected ) ; } function replacer ( _sKey , vValue ) { return vValue instanceof RegExp ? vValue . toString ( ) : vValue ; } Opa . getContext ( ) . iNextLogIndex = aLogEntries . length ; aLogEntries . splice ( iStartIndex ) . forEach ( function ( oLog ) { var sComponent = oLog . component || "" ; if ( Helper . isRelevantLog ( oLog ) ) { if ( isExpected ( oLog ) ) { Opa5 . assert . ok ( true , "Expected Warning or error found: " + sComponent + " Level: " + oLog . level + " Message: " + oLog . message + ( oLog . details ? " Details: " + oLog . details : "" ) ) ; } else { Opa5 . assert . ok ( false , "Unexpected warning or error found: " + sComponent + " Level: " + oLog . level + " Message: " + oLog . message + ( oLog . details ? " Details: " + oLog . details : "" ) + "\r\nExpected one of: " + JSON . stringify ( aExpected , replacer , "\t" ) ) ; } } } ) ; if ( aExpected ) { aExpected . forEach ( function ( oExpected ) { if ( Log . isLoggable ( oExpected . level , oExpected . component ) ) { Opa5 . assert . ok ( false , "Expected warning or error not logged: " + oExpected . component + " Level: " + oExpected . level + " Message: " + oExpected . message + ( oExpected . details ? " Details: " + oExpected . details : "" ) ) ; } } ) ; } Opa5 . assert . ok ( true , "Log checked" ) ; }
checks that console log is clean, or only has <code>aExpected</code> log entries
 @param {object[]} [aExpected]
  An array of log entries that are expected {@link Log.getLogEntries}
checks that console log is clean or only has <code > aExpected< / code > log entries @param { object [] } [ aExpected ] An array of log entries that are expected { @link Log . getLogEntries }