-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: don't use exec to test preloaded modules #696
Conversation
Codecov Report
@@ Coverage Diff @@
## master #696 +/- ##
==========================================
+ Coverage 90.08% 90.15% +0.07%
==========================================
Files 29 29
Lines 1422 1422
Branches 287 287
==========================================
+ Hits 1281 1282 +1
Misses 57 57
+ Partials 84 83 -1
Continue to review full report at Codecov.
|
private innerLogger = logger({level: logger.LEVELS[PASS_THROUGH_LOG_LEVEL]}); | ||
|
||
private makeLoggerFn(logLevel: keyof Logger): LoggerFunction { | ||
// TODO(kjin): When we drop support for Node 4, use spread args. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
private innerLogger = logger({level: logger.LEVELS[PASS_THROUGH_LOG_LEVEL]}); | ||
|
||
private makeLoggerFn(logLevel: keyof Logger): LoggerFunction { | ||
// TODO(kjin): When we drop support for Node 4, use spread args. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
It seems like using
cp.execSync
is a significant source of test flakiness, as the executed command can take more than 4 seconds. The reason for doing this in the past was possibly because it was undesirable to check a global property when all tests ran in a single process. We now run each test in a single process (though if we run tests together again in the future, we will need to ensure that other tests won't interfere with this one).Also, I added a
TestLogger
class to easily check logger output. This is used in #686 as well.