Skip to content

Commit e75006d

Browse files
committed
test: fix turtles test mock
1 parent 5a34c5b commit e75006d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/__tests__/turtles.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ global.createjs = {
2929
Bitmap: jest.fn().mockImplementation(() => ({}))
3030
};
3131

32-
global.importMembers = jest.fn();
32+
global.importMembers = jest.fn((obj, className, modelArgs) => {
33+
if (Array.isArray(modelArgs) && modelArgs.length > 0) {
34+
obj.activity = modelArgs[0];
35+
}
36+
});
3337
global.setupRhythmActions = jest.fn();
3438
global.setupMeterActions = jest.fn();
3539
global.setupPitchActions = jest.fn();

0 commit comments

Comments
 (0)