This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Conversation
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
When calling Loggy.success with a non-existing key, the reference would not be found, and the call to path.basename in Loggy._log would fail (since its parameter was null). This commit: - Catches any exceptions in _log, and displays an error (allowing to continue) - Adds a testing mode to the logger, which is silent but executes logic, and throws an exception upon issues (only to be used in the CLI and lib tests) - Fixes incorrect or missing keys in calls to the logger
@@ -233,7 +233,7 @@ export default class NetworkController { | |||
Loggy.spin(__filename, '_uploadSolidityLib', `upload-solidity-lib${libName}`, `Uploading ${libName} library`); | |||
const libInstance = await this.project.setImplementation(libClass, libName); | |||
this.networkFile.addSolidityLib(libName, libInstance); | |||
Loggy.succeed(`upload-solidity-lob${libName}`, `${libName} library uploaded`); | |||
Loggy.succeed(`upload-solidity-lib${libName}`, `${libName} library uploaded`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
describe('Loggger', function() { | ||
afterEach('restore logger', function() { | ||
Loggy.silent(true); | ||
describe('Logger', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Loggy.isSilent.should.be.true; | ||
Loggy.isVerbose.should.be.false; | ||
}); | ||
|
||
it(`has a 'logs' object initialized`, function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test seems to be failing because Loggy.logs
is being filled by some other test. I believe it's not even necessary to have it, as it's only testing a variable assignment rather than a behavior.
jbcarpanelli
approved these changes
Jul 17, 2019
spalladino
added a commit
that referenced
this pull request
Jul 17, 2019
* Handle incorrect keys to loggy When calling Loggy.success with a non-existing key, the reference would not be found, and the call to path.basename in Loggy._log would fail (since its parameter was null). This commit: - Catches any exceptions in _log, and displays an error (allowing to continue) - Adds a testing mode to the logger, which is silent but executes logic, and throws an exception upon issues (only to be used in the CLI and lib tests) - Fixes incorrect or missing keys in calls to the logger * Remove failing test
jbcarpanelli
pushed a commit
that referenced
this pull request
Jul 18, 2019
* Do not fail if contracts folder is missing (#1107) Fixes #1068 * Handle incorrect keys to loggy (#1112) * Handle incorrect keys to loggy When calling Loggy.success with a non-existing key, the reference would not be found, and the call to path.basename in Loggy._log would fail (since its parameter was null). This commit: - Catches any exceptions in _log, and displays an error (allowing to continue) - Adds a testing mode to the logger, which is silent but executes logic, and throws an exception upon issues (only to be used in the CLI and lib tests) - Fixes incorrect or missing keys in calls to the logger * Remove failing test * Use require.resolve to lookup contracts in deps (#1110) * Use chai expect throw syntax in Dependency tests * Use require.resolve to lookup contracts in deps Change lookup in both Dependency and Contracts classes. Instead of looking for just node_modules in the current folder, it uses require.resolve (relative to the current workdir) to look for the dependency. Fixes #1076 * Fix tests * Add changelogs * Reset circle cache
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When calling Loggy.success with a non-existing key, the reference would not be found, and the call to path.basename in Loggy._log would fail (since its parameter was null). This commit:
Note: we should cherry pick this one onto 2.4