mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: cypress accept baseUrl from env
This commit is contained in:
1 parent
94e8940369
commit
a6ffd6b037
4 files changed
+12
-5
No files matched your search
@@ -1,9 +1,12 @@
|
||||
const { defineConfig } = require('cypress')
|
||||
const process = require('process')
|
||||
|
||||
const getConfig = (key, defaultValue) => {
|
||||
return process.env[key] || defaultValue
|
||||
}
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
setupNodeEvents(on, config) {
|
||||
// implement node event listeners here
|
||||
},
|
||||
baseUrl: getConfig('BASE_URL', 'http://localhost:5173'),
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user