mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-19 19:14:59 +08:00
fix(specs) Correctly set configDirPath
when running tests
Before this commit, running the running the tests would clear all of your config inside `.nylas-dev` and thus your accounts, forcing you to re-add them everytime after you ran the tests This was happening because we weren't correctly setting the `configDirPath` to `.nylas-spec` when running with the --test flag. When we run with --test, both options, `specMode` and `devMode` are true, so the logic to set the path would fall into both conditions and ultimately set the path to `.nylas-dev`. Now it's fixed!
This commit is contained in:
parent
f4dbd555d1
commit
81208062c0
1 changed files with 6 additions and 2 deletions
|
@ -17,8 +17,12 @@ if (typeof process.setFdLimit === 'function') {
|
|||
|
||||
const setupConfigDir = (args) => {
|
||||
let defaultDirName = ".nylas-mail";
|
||||
if (args.specMode) defaultDirName = ".nylas-spec";
|
||||
if (args.devMode) defaultDirName = ".nylas-dev";
|
||||
if (args.devMode) {
|
||||
defaultDirName = ".nylas-dev";
|
||||
}
|
||||
if (args.specMode) {
|
||||
defaultDirName = ".nylas-spec";
|
||||
}
|
||||
let configDirPath = path.join(app.getPath('home'), defaultDirName);
|
||||
|
||||
if (args.configDirPath) {
|
||||
|
|
Loading…
Add table
Reference in a new issue