function assertEventNotFired(
  spy,
  instanceType,
  expectedProperties,
  expectedWorkspaceId,
  expectedBlockId,
) {
  if (expectedWorkspaceId !== undefined) {
    expectedProperties.workspaceId = expectedWorkspaceId;
  }
  if (expectedBlockId !== undefined) {
    expectedProperties.blockId = expectedBlockId;
  }
  const expectedEvent = sinon.match
    .instanceOf(instanceType)
    .and(sinon.match(expectedProperties));
  sinon.assert.neverCalledWith(spy, expectedEvent);
}
Asserts that an event with the given values was not fired.
@param {!sinon.SinonSpy} spy The spy 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.