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
Add xo #492
Add xo #492
Conversation
I don't really use codeclimate but from what I can see the issues it's stating will be fixed later on as I want to make sure these changes don't break anything before I change more. |
I'm not 100% sure what I changed that broke the tests I'm looking into it though. I'm trying to find the issue. diff --git a/test/agenda.js b/test/agenda.js
index 1bbd91a..23b2b6b 100644
--- a/test/agenda.js
+++ b/test/agenda.js
@@ -305,11 +305,15 @@ describe('Agenda', () => {
it('runs the job immediately', done => {
jobs.define('immediateJob', job => {
+ console.log('running.');
expect(job.isRunning()).to.be(true);
jobs.stop(done);
});
+ console.log('setting to now.');
jobs.now('immediateJob');
+ console.log('starting.');
jobs.start();
+ console.log('started.')
});
});
@@ -460,4 +464,4 @@ describe('Agenda', () => {
});
});
});
-});
\ No newline at end of file
+}); |
test/job.js
Outdated
@@ -672,7 +672,7 @@ describe('Job', () => { | |||
|
|||
jobs.define('lock job', { | |||
lockLifetime: 50 | |||
}, () => { | |||
}, (job, cb) => { // eslint-disable-line no-unused-vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simison I think I found the reason this is failing. Even if two params aren't used they need to be there for this test to pass otherwise it only gets called once.
Since this doesn't actually change anything apart from adding in stricter linting I'm going to merge without a review. If anyone has an issue with this please let me know and we can always revert the commit. |
@OmgImAlexis yup! When merging without review most important thing is just to merge via PR, so that things get tested properly. |
And LGTM :-) Thanks! |
Any chance you could ping rschmukler again about removing codeclimate? We're going to end up with a lot of "failed" PRs until that's removed. |
* replace eslint with xo * switch require to using const * move exports to bottom of file * fix whitespace and indentation * var => const, let * remove unneeded setImmediate * remove redundant .editconfig values * allow final newline to be inserted * fix last xo errors * fix last xo errors * last few fixes & enable xo * fix mocha strict mode * fix typo and debug statement * add index.js to xo * lint test files * bump test timeout to 8000ms * fix test timeout with TRAVIS * make mocha bail after first failure * enable linting on all files * remove unneeded err check * remove duplicate var * fix failing test * fix last failing tests * fix no-unused-vars linting issue
Since we're starting on 1.0.0 I thought I'd get this done before we merge anything else so we start with a fully linted repo.
Currently xo is setup to only lint the lib directory as I still need to work on the test section. I'd also like to address some of the issues I've currently disabled with
// eslint-disable-line
.At some stage we should also look into moving the internal functions from the lib files to either their own file or up to the top of the files so they can be reused and tested by themselves.
Closes #455