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

Update major libs dep fix #398 #403

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Conversation

anthony-redFox
Copy link
Collaborator

No description provided.

@anthony-redFox
Copy link
Collaborator Author

@coreyfarrell and @johnjbarton please take a look

@anthony-redFox anthony-redFox changed the title Update major libs dep Update major libs dep fix #398 Mar 18, 2020
Copy link
Contributor

@johnjbarton johnjbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please send separate Pull Requests for separate changes. The commits get squashed and small commits are much better for debugging.

Copy link
Contributor

@johnjbarton johnjbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just split it up and I will take another look

lib/reporter.js Outdated Show resolved Hide resolved
lib/reporter.js Outdated Show resolved Hide resolved
var context = istanbulLibReport.createContext(options)
var report = reports.create(reporterConfig.type || 'html', options)
const context = istanbulLibReport.createContext(options)
const report = reports.create(reporterConfig.type || 'html', options)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I can't figure out what this commit is achieving. I think it is:

fix(reporter): update calls to  match new API in istanbul-lib-report v?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split refactoring and upgrade on separate PRs

Copy link

@coreyfarrell coreyfarrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class in lib/in-memory-report.js needs to extend the istanbul ReportBase class.

const { ReportBase } = require('istanbul-lib-report');

class InMemoryReport extends ReportBase {
  constructor(opt) {
    super(opt);
    this.opt = opt;
  }

  // ... rest of the class..
}

I think this is not picked up by your testing because the in-memory-report tests directly run the functions of a report instance instead of having istanbuljs execute the report. istanbuljs would fail to execute the in memory report as it lacks the execute function which is implemented by ReportBase.

Other than this nothing stands out.

@anthony-redFox
Copy link
Collaborator Author

I will do. Thanks

@johnjbarton johnjbarton merged commit 4962a70 into karma-runner:master Mar 24, 2020
karmarunnerbot pushed a commit that referenced this pull request Apr 13, 2020
## [2.0.2](v2.0.1...v2.0.2) (2020-04-13)

### Bug Fixes

* **reporter:** update calls to  match new API in istanbul-lib-report fix [#398](#398) ([#403](#403)) ([4962a70](4962a70))
* remove information about old istanbul lib ([#404](#404)) ([5cf931a](5cf931a))
@karmarunnerbot
Copy link
Member

🎉 This PR is included in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -218,11 +218,11 @@ var CoverageReporter = function (rootConfig, helper, logger, emitter) {
coverageMap.merge(result.coverage)
}

this.onRunComplete = function (browsers, results) {
this.onRunComplete = async function (browsers, results) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this function async causes result.exitCode to be set too late to be taken into account when karma exits the process.
So when the coverage check thresholds are not met, the process still exits with code 0.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created #418 to track this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants