1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00
budibase/packages/builder/cypress/setup.js

14 lines
460 B
JavaScript
Raw Normal View History

2020-06-12 03:59:11 +12:00
// What this script does:
// 1. Removes the old test folder if it exists (.budibase-cypress)
// 2. Initialises using `.budibase-cypress`
// 3. Runs the server using said folder
2020-06-12 04:14:28 +12:00
const rimraf = require("rimraf")
const homedir = require("os").homedir() + "/.budibase-cypress"
const { execSync } = require("child_process")
2020-06-12 03:59:11 +12:00
rimraf.sync(homedir)
2020-06-12 03:59:11 +12:00
execSync(`../../packages/cli/bin/budi init -d ${homedir}`)
execSync(`../../packages/cli/bin/budi run -d ${homedir}`)