1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Merge pull request #1649 from rayou/fix-1562-change-dummy-data-minimum-count

Changed the minimum count of dummy data (folders and notes)
This commit is contained in:
Junyoung Choi (Sai)
2018-03-09 23:51:39 +09:00
committed by GitHub

View File

@@ -22,7 +22,7 @@ function dummyBoostnoteJSONData (override = {}, isLegacy = false) {
if (override.folders == null) {
data.folders = []
var folderCount = Math.floor((Math.random() * 5)) + 1
var folderCount = Math.floor((Math.random() * 5)) + 2
for (var i = 0; i < folderCount; i++) {
var key = keygen()
while (data.folders.some((folder) => folder.key === key)) {
@@ -105,7 +105,7 @@ function dummyStorage (storagePath, override = {}) {
sander.writeFileSync(path.join(storagePath, 'boostnote.json'), JSON.stringify(jsonData))
var notesData = []
var noteCount = Math.floor((Math.random() * 15)) + 1
var noteCount = Math.floor((Math.random() * 15)) + 2
for (var i = 0; i < noteCount; i++) {
var key = keygen()
while (notesData.some((note) => note.key === key)) {