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

[tests] mutation not covered: callbacks in TestSuite #200

Open
ngarbezza opened this issue Sep 25, 2021 · 0 comments
Open

[tests] mutation not covered: callbacks in TestSuite #200

ngarbezza opened this issue Sep 25, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@ngarbezza
Copy link
Owner

Problem

These two mutations of the code do not trigger a failure in the test suite.

Original:

run(context) {
    this._callbacks.onStart(this);
    this._evaluateSuiteDefinition();
    this._runTests(context);
    this._callbacks.onFinish(this);
  }

mutation 1:

run(context) {
    // this._callbacks.onStart(this);
    this._evaluateSuiteDefinition();
    this._runTests(context);
    this._callbacks.onFinish(this);
  }

mutation 2:

run(context) {
    this._callbacks.onStart(this);
    this._evaluateSuiteDefinition();
    this._runTests(context);
    // this._callbacks.onFinish(this);
  }

Proposed solution
Write tests to make sure those callbacks are executed and the mutation actually makes those tests fail

@ngarbezza ngarbezza added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Sep 25, 2021
@ngarbezza ngarbezza assigned ngarbezza and unassigned ngarbezza Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant