0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-12 16:08:50 -05:00

prevent test example cache

This commit is contained in:
liabru 2021-11-28 21:39:59 +00:00
parent ea3c11b1fe
commit bcc31682d7

View file

@ -3,7 +3,6 @@
"use strict";
const mock = require('mock-require');
const Example = require('../examples/index');
const { requireUncached } = require('./TestTools');
const consoleOriginal = global.console;
@ -160,7 +159,8 @@ const runExample = options => {
const Matter = prepareMatter(options);
const logs = prepareEnvironment(Matter);
const example = Example[options.name]();
const Examples = requireUncached('../examples/index');
const example = Examples[options.name]();
const engine = example.engine;
let totalMemory = 0;