function assertContainsInOrder(str, var_args) {
  /** @suppress {checkTypes} suppression added to enable type checking */
  const expected = array.splice(arguments, 1);
  const indices = array.map(expected, function(val) {
    return str.indexOf(val);
  });

  for (let i = 0; i < expected.length; i++) {
    let msg = 'Missing "' + expected[i] + '" from "' + str + '"';
    assertTrue(msg, indices[i] != -1);

    if (i > 0) {
      msg = '"' + expected[i - 1] + '" should come before "' + expected[i] +
          '" in "' + str + '"';
      assertTrue(msg, indices[i] > indices[i - 1]);
    }
  }
}
Asserts that the given string contains a list of others strings
in the given order.