index.js
function (context, name, actual, expectedArray) {
		'use strict';
		for (let i = 0; i < expectedArray.length; i++) {
			if (actual === expectedArray[i]) {
				return;
			}
		}
		context.assert(
			{
				message: "the response did not contain a valid speechOutput",
				expected: "one of [" + expectedArray.map(text => `"${text}"`).join(', ') + "]",
				actual: actual,
				operator: "==", showDiff: true
			});
	}
function (context, name, actual, expectedArray) {
		'use strict';
		for (let i = 0; i < expectedArray.length; i++) {
			if (actual === expectedArray[i]) {
				return;
			}
		}
		context.assert(
			{
				message: "the response did not contain a valid speechOutput",
				expected: "one of [" + expectedArray.map(text => `"${text}"`).join(', ') + "]",
				actual: actual,
				operator: "==", showDiff: true
			});
	}
function ( context , name , actual , expectedArray ) { 'use strict' ; for ( let i = 0 ; i < expectedArray . length ; i ++ ) { if ( actual === expectedArray [ i ] ) { return ; } } context . assert ( { message : "the response did not contain a valid speechOutput" , expected : "one of [" + expectedArray . map ( text => ` ${ text } ` ) . join ( ', ' ) + "]" , actual : actual , operator : "==" , showDiff : true } ) ; }
Internal method. Asserts if the string is not part of the array.
Internal method . Asserts if the string is not part of the array .