function assertEventFiredShallow(
  spy,
  instanceType,
  expectedProperties,
  expectedWorkspaceId,
  expectedBlockId,
) {
  const properties = {
    ...expectedProperties,
    workspaceId: expectedWorkspaceId,
    blockId: expectedBlockId,
  };
  sinon.assert.calledWith(
    spy,
    sinon.match
      .instanceOf(instanceType)
      .and(sinon.match(shallowMatch(properties))),
  );
}
Asserts that an event with the given values (shallowly evaluated) was fired.
@param {!sinon.SinonSpyCall|!sinon.SinonSpy} spy The spy or spy call to use.
@param {function(new:Blockly.Events.Abstract)} instanceType Expected instance
   type of event fired.
@param {!Object<string, *>} expectedProperties Map of of expected properties
   to check on fired event.
@param {string} expectedWorkspaceId Expected workspace id of event fired.
@param {?string=} expectedBlockId Expected block id of event fired.