function runFromJsonSuiteTests(TestedField, validValueTestCases,
    invalidValueTestCases, validRunAssertField, assertFieldDefault) {
  suite('fromJson', function() {
    test('Empty', function() {
      const field = TestedField.fromJson({});
      assertFieldDefault(field);
    });
    const createWithJson = function(run) {
      return TestedField.fromJson(run.json);
    };
    runCreationTests_(
        invalidValueTestCases, assertFieldDefault, createWithJson);
    runCreationTests_(validValueTestCases, validRunAssertField, createWithJson);
  });
}
/**
 * Runs suite of tests for fromJson creation of specified field.
 * @param {function(new:Blockly.Field, *=)} TestedField The class of the field
 *    being tested.
 * @param {Array<TestCase>} validValueTestCases Test cases with invalid values
 *    for given field.
 * @param {Array<TestCase>} invalidValueTestCases Test cases with valid values
 *    for given field.
 * @param {function(Blockly.Field, TestCase)} validRunAssertField Asserts that
 *    field has expected values.
 * @param {function(Blockly.Field)} assertFieldDefault Asserts that field has
 *    default values.
 */
Runs suite of tests for fromJson creation of specified field.
@param {function(new:Blockly.Field, *=)} TestedField The class of the field
being tested.
@param {Array} validValueTestCases Test cases with invalid values
for given field.
@param {Array} invalidValueTestCases Test cases with valid values
for given field.
@param {function(Blockly.Field, TestCase)} validRunAssertField Asserts that
field has expected values.
@param {function(Blockly.Field)} assertFieldDefault Asserts that field has
default values.
Runs suite of tests for fromJson creation of specified field . @param { function ( new : Blockly . Field * = ) } TestedField The class of the field being tested . @param { Array } validValueTestCases Test cases with invalid values for given field . @param { Array } invalidValueTestCases Test cases with valid values for given field . @param { function ( Blockly . Field TestCase ) } validRunAssertField Asserts that field has expected values . @param { function ( Blockly . Field ) } assertFieldDefault Asserts that field has default values .
function runFromJsonSuiteTests(TestedField, validValueTestCases,
    invalidValueTestCases, validRunAssertField, assertFieldDefault) {
  suite('fromJson', function() {
    test('Empty', function() {
      const field = TestedField.fromJson({});
      assertFieldDefault(field);
    });
    const createWithJson = function(run) {
      return TestedField.fromJson(run.json);
    };
    runCreationTests_(
        invalidValueTestCases, assertFieldDefault, createWithJson);
    runCreationTests_(validValueTestCases, validRunAssertField, createWithJson);
  });
}
function runFromJsonSuiteTests ( TestedField , validValueTestCases , invalidValueTestCases , validRunAssertField , assertFieldDefault ) { suite ( 'fromJson' , function ( ) { test ( 'Empty' , function ( ) { const field = TestedField . fromJson ( { } ) ; assertFieldDefault ( field ) ; } ) ; const createWithJson = function ( run ) { return TestedField . fromJson ( run . json ) ; } ; runCreationTests_ ( invalidValueTestCases , assertFieldDefault , createWithJson ) ; runCreationTests_ ( validValueTestCases , validRunAssertField , createWithJson ) ; } ) ; }
Runs suite of tests for fromJson creation of specified field.
Runs suite of tests for fromJson creation of specified field .