openvibers/openvibe.chat Commits

N-1 test: the booted release's stub data directory (test/helpers.js's temp directory) goes when it exits, so each run leaves nothing in the temp directory

OP OpenVibers committed 26 Sept 2026 · 04bdd6636b · 1 file, +1 −0


Changes

ddiff --git a/test/n-1/boot-child.js b/test/n-1/boot-child.js
iindex 7187411..cdecdc6 100644
---- a/test/n-1/boot-child.js
++++ b/test/n-1/boot-child.js
@@@ -12,6 +12,7 @@ const path = require('path');
console.warn = quiet;
const helpers = require(path.join(dir, 'test', 'helpers'));
const h = await helpers.boot({ env: { CHAT_DB_PATH: process.env.N1_DB } });
++ process.on('exit', () => { try { require('fs').rmSync(h.tmp, { recursive: true, force: true }); } catch { /* */ } });
const star = h.addUser('n1star', { role: 'streamer' });
const fan = h.addUser('n1fan');
const channel = h.addChannel(star.id);