-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: allow easier test debugging via
TEDIOUS_DEBUG
env variable (#…
- Loading branch information
1 parent
0f105c6
commit 4f3e210
Showing
15 changed files
with
310 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export function debugOptionsFromEnv() { | ||
const options = { | ||
packet: false, | ||
data: false, | ||
payload: false, | ||
token: false, | ||
}; | ||
|
||
if (!process.env.TEDIOUS_DEBUG) { | ||
return options; | ||
} | ||
|
||
for (const type of process.env.TEDIOUS_DEBUG.split(',')) { | ||
switch (type) { | ||
case 'packet': | ||
case 'data': | ||
case 'payload': | ||
case 'token': | ||
options[type] = true; | ||
} | ||
} | ||
|
||
return options; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.