client/src/store/__tests__/record.test.js
author ymh <ymh.work@gmail.com>
Mon, 08 Oct 2018 18:35:47 +0200
changeset 168 ea92f4fe783d
permissions -rw-r--r--
- move SlateEditor and dependencies to its own folder - remove Immutable - remove redux-persist-immutable - remobe redux-immutable - update libraries - added tests on store manipulations (accessor and reducers)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
168
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import { Record } from '../index';
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
describe('test on record', () => {
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
  it('Test simple record creation', () => {
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
    const TestRecord = Record({ foo: 'bar', hello: 'world'});
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
    expect(
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
      TestRecord({ a: 'b', foo: 'foobar' })
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
    ).toEqual(
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
      { foo: 'foobar', hello: 'world'}
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    )
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  });
ea92f4fe783d - move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
});