Skip to content

Commit

Permalink
testing fix. other errors due to stupid jest stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalacho-mit committed Nov 27, 2023
1 parent fde1397 commit 1f27b09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/testing/BlockRunner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlockType, ExtensionBlockMetadata, ExtensionConstructorParams, ExtensionInstance, NonAbstractConstructor } from "$common";
import { BlockType, ExtensionBlockMetadata, ExtensionConstructorParams, ExtensionInstance, NonAbstractConstructor, blockIDKey } from "$common";
import { isLegacy } from "$common/extension/mixins/configurable/legacySupport";
import BlockUtility from "$root/packages/scratch-vm/src/engine/block-utility";
import { buildKeyBlockMap } from "$testing";
Expand Down Expand Up @@ -56,6 +56,7 @@ export class BlockRunner<T extends ExtensionInstance> {

private mockBlockUtility(): BlockUtility {
const utility = new (jest.createMockFromModule(getEngineFile("block-utility")) as any)() as BlockUtility;
utility[blockIDKey] = "test-block";
// utility can be built up over time
return utility;
}
Expand Down

0 comments on commit 1f27b09

Please sign in to comment.