Temporary dir for gun test data files
This commit is contained in:
parent
fa3d19f0e9
commit
e95b4154da
2 changed files with 9 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,6 +7,7 @@ services/auth/secrets.json
|
||||||
*.log.*
|
*.log.*
|
||||||
.directory
|
.directory
|
||||||
|
|
||||||
|
test-radata/
|
||||||
radata/
|
radata/
|
||||||
radata-*.tmp
|
radata-*.tmp
|
||||||
*.cert
|
*.cert
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,13 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
const Gun = require('./GunSmith')
|
const Gun = require('./GunSmith')
|
||||||
const words = require('random-words')
|
const words = require('random-words')
|
||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
|
if (!fs.existsSync('./test-radata')) {
|
||||||
|
fs.mkdirSync('./test-radata')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** @type {ReturnType<typeof Gun>} */
|
/** @type {ReturnType<typeof Gun>} */
|
||||||
// eslint-disable-next-line init-declarations
|
// eslint-disable-next-line init-declarations
|
||||||
|
|
@ -32,7 +39,7 @@ describe('constructor', () => {
|
||||||
instance = Gun({
|
instance = Gun({
|
||||||
axe: false,
|
axe: false,
|
||||||
multicast: false,
|
multicast: false,
|
||||||
file: Math.random().toString()
|
file: './test-radata/' + words({exactly: 2}).join('-'),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue