Do not use expect to get better diffs out of Jest

This commit is contained in:
Andrey Okonetchnikov 2016-11-11 11:02:11 +01:00
parent 92e8e7233d
commit 6ce58a789d

View File

@ -1,4 +1,3 @@
import expect from 'expect';
import { OrderedMap, fromJS } from 'immutable';
import { configLoaded } from '../../actions/config';
import collections from '../collections';
@ -15,11 +14,11 @@ describe('collections', () => {
it('should load the collections from the config', () => {
expect(
collections(undefined, configLoaded({ collections: [
{ name: 'posts', folder: '_posts', fields: [{ name: 'title', widget: 'string' }] }
{ 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' }] }),
})
);
});