Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

utf4
Copy link

@utf4 utf4 commented Nov 11, 2016

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.

});

it('should return false if passed data is invalid', function() {
var ret = packerCache.feed('bikes', "Invalid");

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' } ]);

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' } ]);

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' } ]);

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' } ]);

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' } ]);

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", []);

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants