Fixed ESLint errors and warning that could be fixed with eslint --fix

This commit is contained in:
Andrey Okonetchnikov
2016-09-13 15:30:58 +02:00
parent 09841c05e2
commit eb14200643
19 changed files with 48 additions and 48 deletions

View File

@ -16,15 +16,15 @@ describe('auth', () => {
expect(
auth(undefined, authenticating())
).toEqual(
Immutable.Map({isFetching: true})
Immutable.Map({ isFetching: true })
);
});
it('should handle authentication', () => {
expect(
auth(undefined, authenticate({email: 'joe@example.com'}))
auth(undefined, authenticate({ email: 'joe@example.com' }))
).toEqual(
Immutable.fromJS({user: {email: 'joe@example.com'}})
Immutable.fromJS({ user: { email: 'joe@example.com' } })
);
});

View File

@ -15,39 +15,39 @@ describe('collections', () => {
it('should load the collections from the config', () => {
expect(
collections(undefined, configLoaded({collections: [
{name: 'posts', folder: '_posts', fields: [{name: 'title', widget: 'string'}]}
]}))
collections(undefined, configLoaded({ collections: [
{ name: 'posts', folder: '_posts', fields: [{ name: 'title', widget: 'string' }] }
] }))
).toEqual(
OrderedMap({
posts: fromJS({name: 'posts', folder: '_posts', fields: [{name: 'title', widget: 'string'}]})
posts: fromJS({ name: 'posts', folder: '_posts', fields: [{ name: 'title', widget: 'string' }] })
})
);
});
it('should mark entries as loading', () => {
const state = OrderedMap({
'posts': Map({name: 'posts'})
'posts': Map({ name: 'posts' })
});
expect(
collections(state, entriesLoading(Map({name: 'posts'})))
collections(state, entriesLoading(Map({ name: 'posts' })))
).toEqual(
OrderedMap({
'posts': Map({name: 'posts', isFetching: true})
'posts': Map({ name: 'posts', isFetching: true })
})
);
});
it('should handle loaded entries', () => {
const state = OrderedMap({
'posts': Map({name: 'posts'})
'posts': Map({ name: 'posts' })
});
const entries = [{slug: 'a', path: ''}, {slug: 'b', title: 'B'}];
const entries = [{ slug: 'a', path: '' }, { slug: 'b', title: 'B' }];
expect(
collections(state, entriesLoaded(Map({name: 'posts'}), entries))
collections(state, entriesLoaded(Map({ name: 'posts' }), entries))
).toEqual(
OrderedMap({
'posts': fromJS({name: 'posts', entries: entries})
'posts': fromJS({ name: 'posts', entries: entries })
})
);
});

View File

@ -14,9 +14,9 @@ describe('config', () => {
it('should handle an update', () => {
expect(
config(Immutable.Map({'a': 'b', 'c': 'd'}), configLoaded({'a': 'changed', 'e': 'new'}))
config(Immutable.Map({ 'a': 'b', 'c': 'd' }), configLoaded({ 'a': 'changed', 'e': 'new' }))
).toEqual(
Immutable.Map({'a': 'changed', 'e': 'new'})
Immutable.Map({ 'a': 'changed', 'e': 'new' })
);
});
@ -24,15 +24,15 @@ describe('config', () => {
expect(
config(undefined, configLoading())
).toEqual(
Immutable.Map({isFetching: true})
Immutable.Map({ isFetching: true })
);
});
it('should handle an error', () => {
expect(
config(Immutable.Map({isFetching: true}), configFailed(new Error('Config could not be loaded')))
config(Immutable.Map({ isFetching: true }), configFailed(new Error('Config could not be loaded')))
).toEqual(
Immutable.Map({error: 'Error: Config could not be loaded'})
Immutable.Map({ error: 'Error: Config could not be loaded' })
);
});
});