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 whitespace and indentation #489

Merged
merged 1 commit into from Jul 27, 2017
Merged

fix whitespace and indentation #489

merged 1 commit into from Jul 27, 2017

Conversation

@OmgImAlexis
Copy link
Member

OmgImAlexis commented Jul 27, 2017

This cleans up unneeded whitespace and fixes some indentation so it's a little easier to read.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Jul 27, 2017

Coverage Status

Coverage increased (+0.4%) to 80.369% when pulling dea819f on clean/whitespace into 2411cb3 on master.

@simison

This comment has been minimized.

Copy link
Member

simison commented Jul 27, 2017

Weird:

image

  agenda
    Agenda
      1) "before each" hook
      2) "after each" hook
  agenda
    Job
      repeatAt
        3) "before each" hook
        4) "after each" hook
  agenda
    Retry
      5) "before each" hook
      6) "after each" hook
  0 passing (413ms)
  6 failing
  1) agenda "before each" hook:
     Uncaught TypeError: Cannot read property 'collection' of null
      at clearJobs (test/agenda.js:19:8)
      at Timeout._onTimeout (test/agenda.js:43:11)
  2) agenda "after each" hook:
     Uncaught TypeError: Cannot read property 'updateMany' of undefined
      at module.exports.Agenda._unlockJobs (lib/agenda.js:755:19)
      at module.exports.Agenda.stop (lib/agenda.js:659:8)
      at Timeout._onTimeout (test/agenda.js:57:12)
  3) agenda "before each" hook:
     Uncaught TypeError: Cannot read property 'collection' of null
      at clearJobs (test/job.js:19:8)
      at Timeout._onTimeout (test/job.js:43:11)
  4) agenda "after each" hook:
     Uncaught TypeError: Cannot read property 'updateMany' of undefined
      at module.exports.Agenda._unlockJobs (lib/agenda.js:755:19)
      at module.exports.Agenda.stop (lib/agenda.js:659:8)
      at Timeout._onTimeout (test/job.js:57:12)
  5) agenda "before each" hook:
     Uncaught TypeError: Cannot read property 'collection' of null
      at clearJobs (test/retry.js:19:8)
      at Timeout._onTimeout (test/retry.js:43:11)
  6) agenda "after each" hook:
     Uncaught TypeError: Cannot read property 'updateMany' of undefined
      at module.exports.Agenda._unlockJobs (lib/agenda.js:755:19)
      at module.exports.Agenda.stop (lib/agenda.js:659:8)
      at Timeout._onTimeout (test/retry.js:57:12)
make: *** [test-once] Error 6
The command "make test-once" exited with 2.

...I'll re-run Travis by closing+opening.

@simison simison closed this Jul 27, 2017
@simison simison reopened this Jul 27, 2017
@coveralls

This comment has been minimized.

Copy link

coveralls commented Jul 27, 2017

Coverage Status

Coverage increased (+3.09%) to 83.054% when pulling dea819f on clean/whitespace into 2411cb3 on master.

@simison

This comment has been minimized.

Copy link
Member

simison commented Jul 27, 2017

LGTM

@OmgImAlexis

This comment has been minimized.

Copy link
Member Author

OmgImAlexis commented Jul 27, 2017

@simison I noticed that there are some documents left in mongodb and by clearing it before running the tests locally I didn't get any issues at all. If I left the docs then randomly I'd get issues with the tests failing. I wonder if that's the cause?

@OmgImAlexis OmgImAlexis merged commit c84c523 into master Jul 27, 2017
4 checks passed
4 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls First build on clean/whitespace at 79.698%
Details
@OmgImAlexis OmgImAlexis deleted the clean/whitespace branch Jul 27, 2017
@simison

This comment has been minimized.

Copy link
Member

simison commented Jul 27, 2017

@OmgImAlexis could be, I've had the same happening with few other projects before.

Mongo db.dropDatabase is handy to do at the very beginning of tests (or even in between).

@OmgImAlexis

This comment has been minimized.

Copy link
Member Author

OmgImAlexis commented Jul 27, 2017

@simison @lushc maybe we should try adding that before all the test files run and see if it fixes it?

@simison

This comment has been minimized.

Copy link
Member

simison commented Jul 27, 2017

There might be more to it as it happens so randomly, but that would at least help tests pass when they should.

@emhagman

This comment has been minimized.

Copy link
Contributor

emhagman commented Jul 27, 2017

Since we have started to fix whitespace and indentation, do you think it is time to start using xo in the code? Linting before tests run and adding a npm script that can autoformat the code?

@OmgImAlexis

This comment has been minimized.

Copy link
Member Author

OmgImAlexis commented Jul 28, 2017

@simison sounds good to me.

@emhagman I want to fix up some more of the styling before adding xo otherwise we'll end up with a massive PR/commit again. It'll be easier to slowly lint the files and merge them in parts so everyone can rebase the current PRs.

I would like to get xo added before 1.0.0 is published.

@OmgImAlexis OmgImAlexis modified the milestone: 0.10.0 Jul 29, 2017
timelf123 added a commit to ideawake/agenda that referenced this pull request Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.