From e95b4154da13d5b9feb35cd5940b83624d4801d3 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Tue, 14 Sep 2021 11:59:06 -0400 Subject: [PATCH] Temporary dir for gun test data files --- .gitignore | 1 + utils/GunSmith/GunSmith.spec.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 81cbd001..6f0099eb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ services/auth/secrets.json *.log.* .directory +test-radata/ radata/ radata-*.tmp *.cert diff --git a/utils/GunSmith/GunSmith.spec.js b/utils/GunSmith/GunSmith.spec.js index a577b99a..55cb8288 100644 --- a/utils/GunSmith/GunSmith.spec.js +++ b/utils/GunSmith/GunSmith.spec.js @@ -6,6 +6,13 @@ // @ts-check const Gun = require('./GunSmith') const words = require('random-words') +const fs = require('fs') + +if (!fs.existsSync('./test-radata')) { + fs.mkdirSync('./test-radata') +} + + /** @type {ReturnType} */ // eslint-disable-next-line init-declarations @@ -32,7 +39,7 @@ describe('constructor', () => { instance = Gun({ axe: false, multicast: false, - file: Math.random().toString() + file: './test-radata/' + words({exactly: 2}).join('-'), }) })