-
Notifications
You must be signed in to change notification settings - Fork 87
Enhancement: Cache array, object, gradual feeding #402
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
base: master
Are you sure you want to change the base?
Conversation
}); | ||
|
||
it('should return false if passed data is invalid', function() { | ||
var ret = packerCache.feed('bikes', "Invalid"); |
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.
Mixed double and single quotes.
|
||
it('should feed array is passed after object', function() { | ||
packerCache.feed('bikes', { id: 11, model: 'Banana' }); | ||
packerCache.feed('bikes', [ { id: 12, model: 'Apple' }, { id: 13, model: 'Mango' } ]); |
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.
Line is too long.
}); | ||
|
||
it('should feed object is passed after array', function() { | ||
packerCache.feed('bikes', [ { id: 8, model: 'Apple' }, { id: 9, model: 'Mango' } ]); |
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.
Line is too long.
|
||
it('should feed array is passed after array', function() { | ||
packerCache.feed('bikes', [ { id: 4, model: 'Apple' }, { id: 5, model: 'Mango' } ]); | ||
packerCache.feed('bikes', [ { id: 6, model: 'Banana' }, { id: 7, model: 'Dates' } ]); |
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.
Line is too long.
}); | ||
|
||
it('should feed array is passed after array', function() { | ||
packerCache.feed('bikes', [ { id: 4, model: 'Apple' }, { id: 5, model: 'Mango' } ]); |
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.
Line is too long.
}); | ||
|
||
it('should feed data if passed as array at start', function() { | ||
packerCache.feed('bikes', [ { id: 1, model: 'Meta' }, { id: 2, model: 'Slash' } ]); |
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.
Line is too long.
|
||
it('shouldnt fail if packer not initialized', function() { | ||
expect(function() { | ||
packerCache.feed("test", []); |
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.
Mixed double and single quotes.
I am working on jsonapi.org strict standard and that is sending everything in included:{} element, which need object and gradual cache feeding. Please have a look and see if this can be mergable or suggest any improvements.