Skip to content

Commit ca69e94

Browse files
committed
fix/workaround memory leaks
1 parent 9e3cecc commit ca69e94

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/TestCases.template.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,12 @@ const describeCases = config => {
187187
})
188188
};
189189
beforeAll(done => {
190+
FileCachePlugin.purgeMemoryCache();
190191
rimraf(cacheDirectory, done);
191192
});
193+
afterAll(() => {
194+
FileCachePlugin.purgeMemoryCache();
195+
});
192196
if (config.cache) {
193197
it(testName + " should pre-compile", done => {
194198
FileCachePlugin.purgeMemoryCache();

test/setupTestFramework.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ if (process.env.ALTERNATIVE_SORT) {
5050
return this;
5151
};
5252
}
53+
54+
// Workaround for a memory leak in wabt
55+
// It leaks an Error object on construction
56+
// so it leaks the whole stack trace
57+
require("wast-loader");

0 commit comments

Comments
 (0)