1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add slight delay to fix config.json file tests

This commit is contained in:
Nick O'Leary 2020-09-24 16:54:24 +01:00
parent 4d0c572c2e
commit 96d81ef72b
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -100,8 +100,13 @@ describe('storage/localfilesystem/settings', function() {
const fsStatProjects = await fs.stat(path.join(userDir,".config.projects.json"))
const fsStatRuntime = await fs.stat(path.join(userDir,".config.runtime.json"))
return localfilesystemSettings.init({userDir:userDir}).then(() => {
return localfilesystemSettings.init({userDir:userDir}).then(function() {
return new Promise(res => {
setTimeout(function() {
res();
},10)
});
}).then(() => {
return localfilesystemSettings.saveSettings({
nodes:{d:4},
_credentialSecret: "bar",
@ -109,6 +114,7 @@ describe('storage/localfilesystem/settings', function() {
projects: {c:3}
})
}).then(async function() {
const newFsStatNodes = await fs.stat(path.join(userDir,".config.nodes.json"))
const newFsStatUsers = await fs.stat(path.join(userDir,".config.users.json"))
const newFsStatProjects = await fs.stat(path.join(userDir,".config.projects.json"))