Skip to content

Conversation

@geek
Copy link
Member

@geek geek commented May 17, 2016

Closes #337
Closes #440

@geek geek added the feature New functionality or improvement label May 17, 2016
@geek geek added this to the 10.5.2 milestone May 17, 2016
@geek geek assigned geek and cjihrig and unassigned geek May 17, 2016
lib/runner.js Outdated
state.domains = [];

const skipExperiment = skip || experiment.options.skip;
const skipExperiment = skip || experiment.options.skip || !internals.experirementHasTests(experiment, state);
Copy link
Contributor

Choose a reason for hiding this comment

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

experiment is spelt wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

exper ire ment :(

lib/runner.js Outdated
}
});

return tests.length;
Copy link
Contributor

Choose a reason for hiding this comment

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

You should probably convert this to a Boolean before returning. "has tests" implies to me that it would be a Boolean.

@geek geek changed the title Don't execute before/after on expirements that lack tests Don't execute before/after on experiments that lack tests May 18, 2016

internals.experimentHasTests = function (experiment, state) {

if (experiment.experiments.length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

purely personal opinion but I find > 0 more clear as to what you are doing, just a fyi

@cjihrig cjihrig merged commit 6de0f1b into hapijs:master May 18, 2016
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

before and after blocks Skipped tests should have their beforeEach() skipped too?

4 participants