This repository has been archived by the owner on Aug 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Justin Bourrousse
committed
Nov 8, 2018
1 parent
674b2b4
commit 14195f2
Showing
13 changed files
with
527 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules/ | ||
node_modules/ | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"semi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
* Expose module. | ||
*/ | ||
|
||
module.exports = require('./lib/taskman'); | ||
module.exports = require('./lib/taskman'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
var queueKey = require('../../lib/keys/queue'); | ||
var expect = require('chai').expect; | ||
|
||
describe('Queue key', function () { | ||
describe('#formatList', function () { | ||
it('should format key', function () { | ||
describe('Queue key', function() { | ||
describe('#formatList', function() { | ||
it('should format key', function() { | ||
expect(queueKey.formatList('test')).to.equal('queue:test'); | ||
}); | ||
}); | ||
|
||
describe('#formatSet', function () { | ||
it('should format key', function () { | ||
describe('#formatSet', function() { | ||
it('should format key', function() { | ||
expect(queueKey.formatSet('test')).to.equal('unique:test'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
var workerKey = require('../../lib/keys/worker'); | ||
var expect = require('chai').expect; | ||
|
||
describe('Worker key', function () { | ||
describe('#formatHash', function () { | ||
it('should format key', function () { | ||
describe('Worker key', function() { | ||
describe('#formatHash', function() { | ||
it('should format key', function() { | ||
expect(workerKey.formatHash('test', 'w1')).to.equal('worker:test:w1'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
var parser = require('../../lib/parsers/json'); | ||
var expect = require('chai').expect; | ||
|
||
describe('JSON parser', function () { | ||
describe('#format', function () { | ||
it('should catch errors', function (done) { | ||
describe('JSON parser', function() { | ||
describe('#format', function() { | ||
it('should catch errors', function(done) { | ||
// Create a circular structure. | ||
var obj = {}; | ||
obj.obj = obj; | ||
|
||
parser.format(obj, function (err) { | ||
parser.format(obj, function(err) { | ||
expect(err).to.exists; | ||
done(); | ||
}); | ||
}); | ||
|
||
it('should format data', function (done) { | ||
var obj = {foo: 'bar'}; | ||
it('should format data', function(done) { | ||
var obj = { foo: 'bar' }; | ||
|
||
parser.format(obj, function (err, data) { | ||
parser.format(obj, function(err, data) { | ||
if (err) return done(err); | ||
expect(data).to.equal('{"foo":"bar"}'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('#parse', function () { | ||
it('should catch errors', function (done) { | ||
parser.parse('{foo:bar}', function (err) { | ||
describe('#parse', function() { | ||
it('should catch errors', function(done) { | ||
parser.parse('{foo:bar}', function(err) { | ||
expect(err).to.exists; | ||
done(); | ||
}); | ||
}); | ||
|
||
it('should parse data', function (done) { | ||
parser.parse('{"foo":"bar"}', function (err, data) { | ||
it('should parse data', function(done) { | ||
parser.parse('{"foo":"bar"}', function(err, data) { | ||
if (err) return done(err); | ||
expect(data).to.eql({foo: 'bar'}); | ||
expect(data).to.eql({ foo: 'bar' }); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.