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 #4 and incorrect options issue #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BurningLutz
Copy link

As is mentioned in #4, numPassedTests(an other fields used by drawScoreboard) is not provided in onRunStart callback so its value is "undefined", We should give it a default value.

And, as is mentioned in jest's doc:

Custom reporter modules must define a class that takes a GlobalConfig and reporter options as constructor arguments:

// my-custom-reporter.js
class MyCustomReporter {
  constructor(globalConfig, options) {
    this._globalConfig = globalConfig;
    this._options = options;
  }

  onRunComplete(contexts, results) {
    console.log('Custom reporter output:');
    console.log('GlobalConfig: ', this._globalConfig);
    console.log('Options: ', this._options);
  }
}

module.exports = MyCustomReporter;

The first arg of constructor is GlobalConfig but we don't use it, so just skip it.

- set default value for n in drawType
@philihp
Copy link

philihp commented Feb 5, 2019

@abdulhannanali can we get some of these fixes merged? this issue was first reported in 2017

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.

2 participants