Skip to content

Commit d0e226f

Browse files
committed
Added a workaround for karma-jasmine test errors
This was causing Electron to hang after tests complete
1 parent 12917da commit d0e226f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/app/spec-reporters.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ if (process.env.DEBUG_TIME) {
5151
}
5252

5353
jasmine.getEnv().addReporter({
54-
jasmineDone: () => {
54+
jasmineDone: (result) => {
55+
// KLUDGE: Delete the sort function from the result to prevent errors
56+
// when sending it over IPC. This may be fixed in a later
57+
// version of karma-jasmine or karma-electron (in which case
58+
// this line may be removed)
59+
// See: https://github.com/twolfson/karma-electron/issues/47
60+
delete result.order.sort;
61+
5562
console.log("Total memory is", chromePerformance.memory.usedJSHeapSize);
5663

5764
setTimeout(() => {

0 commit comments

Comments
 (0)