mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
actually fix ormconfig.test.json being read when not in test environment
This commit is contained in:
@@ -22,9 +22,13 @@ const test: IConfig = {
|
||||
...production,
|
||||
jwtSecret: "TESTSECRET",
|
||||
dbConnectionOptions:
|
||||
process.env.NODE_ENV === "test" && process.env.CI
|
||||
? JSON.parse(fs.readFileSync("./ormconfig.ci.json").toString())
|
||||
: JSON.parse(fs.readFileSync("./ormconfig.test.json").toString()),
|
||||
process.env.NODE_ENV === "test"
|
||||
? process.env.CI
|
||||
? JSON.parse(fs.readFileSync("./ormconfig.ci.json").toString())
|
||||
: JSON.parse(
|
||||
fs.readFileSync("./ormconfig.test.json").toString(),
|
||||
)
|
||||
: null,
|
||||
};
|
||||
|
||||
const envs: { [key: string]: IConfig } = { production, development, test };
|
||||
|
||||
Reference in New Issue
Block a user