function assertFieldValue(
  field,
  expectedValue,
  expectedText = undefined,
) {
  const actualValue = field.getValue();
  const actualText = field.getText();
  if (expectedText === undefined) {
    expectedText = String(expectedValue);
  }
  assert.equal(actualValue, expectedValue, 'Value');
  assert.equal(actualText, expectedText, 'Text');
}
Assert a field's value is the same as the expected value.
@param {!Blockly.Field} field The field.
@param {*} expectedValue The expected value.
@param {string=} expectedText The expected text.