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.*
|
||||
.directory
|
||||
|
||||
test-radata/
|
||||
radata/
|
||||
radata-*.tmp
|
||||
*.cert
|
||||
|
|
|
|||
|
|
@ -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<typeof Gun>} */
|
||||
// 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('-'),
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue