Fixing an intermettient test issue.
This commit is contained in:
parent
a38626cf66
commit
cd6874b2b0
|
@ -44,7 +44,15 @@ const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules")
|
||||||
exports.init = () => {
|
exports.init = () => {
|
||||||
const tempDir = budibaseTempDir()
|
const tempDir = budibaseTempDir()
|
||||||
if (!fs.existsSync(tempDir)) {
|
if (!fs.existsSync(tempDir)) {
|
||||||
fs.mkdirSync(tempDir)
|
// some test cases fire this quickly enough that
|
||||||
|
// synchronous cases can end up here at the same time
|
||||||
|
try {
|
||||||
|
fs.mkdirSync(tempDir)
|
||||||
|
} catch (err) {
|
||||||
|
if (!err || err.code !== "EEXIST") {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const clientLibPath = join(budibaseTempDir(), "budibase-client.js")
|
const clientLibPath = join(budibaseTempDir(), "budibase-client.js")
|
||||||
if (env.isTest() && !fs.existsSync(clientLibPath)) {
|
if (env.isTest() && !fs.existsSync(clientLibPath)) {
|
||||||
|
|
Loading…
Reference in New Issue