From 4654f4803226c54ac9d00fe57f70fe6d74a21ea3 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Wed, 27 Feb 2019 09:39:52 -0700 Subject: [PATCH] short-circuit valuePattern validation when stringTest query parameter is provided, https://github.com/phetsims/masses-and-springs/issues/344, https://github.com/phetsims/sun/issues/472 --- js/NumberSpinner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/NumberSpinner.js b/js/NumberSpinner.js index 090ca590..7c043619 100644 --- a/js/NumberSpinner.js +++ b/js/NumberSpinner.js @@ -88,7 +88,8 @@ define( function( require ) { // validate options assert && assert( _.includes( ARROWS_POSITION_VALUES, options.arrowsPosition ), 'invalid arrowsPosition: ' + options.arrowsPosition ); assert && assert( _.includes( VALUE_ALIGN_VALUES, options.valueAlign ), 'invalid valueAlign: ' + options.valueAlign ); - assert && assert( options.valuePattern.indexOf( SunConstants.VALUE_NAMED_PLACEHOLDER ) !== -1, + assert && assert( !!phet.chipper.queryParameters.stringTest || + options.valuePattern.indexOf( SunConstants.VALUE_NAMED_PLACEHOLDER ) !== -1, 'missing value placeholder in options.valuePattern: ' + options.valuePattern ); Tandem.indicateUninstrumentedCode();