Skip to content
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

[FIX] Promisified config client #215

Closed
wants to merge 6 commits into from
Closed

Conversation

adibas03
Copy link
Contributor

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1318

  • 22 of 29 (75.86%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.2%) to 84.368%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Config/Config.ts 19 26 73.08%
Files with Coverage Reduction New Missed Lines %
src/Actions/Pending.ts 4 59.46%
Totals Coverage Status
Change from base Build 1311: -1.2%
Covered Lines: 565
Relevant Lines: 645

💛 - Coveralls

@coveralls
Copy link

coveralls commented Aug 16, 2018

Pull Request Test Coverage Report for Build 1385

  • 26 of 27 (96.3%) changed or added relevant lines in 3 files are covered.
  • 27 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+1.8%) to 83.939%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Config/Config.ts 21 22 95.45%
Files with Coverage Reduction New Missed Lines %
src/Config/helpers.ts 3 40.0%
src/Actions/Pending.ts 12 39.38%
src/EconomicStrategy/EconomicStrategyHelpers.ts 12 46.51%
Totals Coverage Status
Change from base Build 1382: 1.8%
Covered Lines: 710
Relevant Lines: 812

💛 - Coveralls

@lsaether
Copy link
Member

lsaether commented Aug 16, 2018

I still think it's viable to wrap the config constructor in a static function that returns a promise so you only need to call await once upon initialization of config.

static async create(): Promise<Config> {
 const config = new Config();
 await randomAsyncStuff;
 return config;

Then when u create the config

await config.create();

@kosecki123
Copy link
Contributor

This looks good to me. Another thing I start to think about it why this code is in Config. Looks like this should be a part of Pending.ts, especially there is quite a lot of code taken from there.

@kosecki123
Copy link
Contributor

Please hold on this, I think this code will be removed when #183 gets merged.

@adibas03 adibas03 closed this Aug 21, 2018
@adibas03 adibas03 deleted the fix/config-instantiation branch August 21, 2018 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants