mirror of
https://github.com/sasjs/server.git
synced 2026-01-05 05:40:06 +00:00
chore: added driveLoc for specs
This commit is contained in:
@@ -8,7 +8,10 @@ import { getRealPath } from '@sasjs/utils'
|
|||||||
export const connectDB = async () => {
|
export const connectDB = async () => {
|
||||||
// NOTE: when exporting app.js as agent for supertest
|
// NOTE: when exporting app.js as agent for supertest
|
||||||
// we should exlcude connecting to the real database
|
// we should exlcude connecting to the real database
|
||||||
if (process.env.NODE_ENV !== 'test') {
|
if (process.env.NODE_ENV === 'test') {
|
||||||
|
process.driveLoc = path.join(process.cwd(), 'tmp')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
const { MODE } = process.env
|
const { MODE } = process.env
|
||||||
|
|
||||||
if (MODE?.trim() !== 'server') {
|
if (MODE?.trim() !== 'server') {
|
||||||
|
|||||||
Reference in New Issue
Block a user