Skip to content

Separate error-checking and next/done logic from other logic - #2297

Merged
superkhau merged 1 commit into
strongloop:masterfrom
supasate:refactor/separate-error-checking-and-next-and-done-logic-from-others
May 6, 2016
Merged

Separate error-checking and next/done logic from other logic#2297
superkhau merged 1 commit into
strongloop:masterfrom
supasate:refactor/separate-error-checking-and-next-and-done-logic-from-others

Conversation

@supasate

@supasate supasate commented May 5, 2016

Copy link
Copy Markdown
Contributor

Based on @superkhau's suggestion that we should add blank lines to separate error-checking logic, done logic from other logic. I found most test files still don't follow this convention. So, I've refactored them.

I also changed a few error checking conditions to be one-liner;
From

if (err) {
  return done(err);
}

to
if (err) return done(err);

…est suite

Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
@superkhau

Copy link
Copy Markdown
Contributor

LGTM. Thanks for the contribution! ;)

@superkhau
superkhau merged commit ca1baee into strongloop:master May 6, 2016
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.

3 participants