message: refactor(core): regroup store tests
diff: @@ -17,28 +17,29 @@ beforeEach(() => {
  }
  })
  -test('insert', () => {
  +describe('Insert', () => {
  + test('default plugin', () => {
  state = reducer(state, {
  type: ActionType.Insert,
  payload: {
  - id: '0',
  - plugin: 'stateless'
  + id: '0'
  }
  })
  - expect(getDocument(state, '0')).toEqual({ plugin: 'stateless' })
  + expect(getDocument(state, '0')).toEqual({ plugin: 'default' })
  })
  -test('insert default plugin', () => {
  + test('stateless plugin', () => {
  state = reducer(state, {
  type: ActionType.Insert,
  payload: {
  - id: '0'
  + id: '0',
  + plugin: 'stateless'
  }
  })
  - expect(getDocument(state, '0')).toEqual({ plugin: 'default' })
  + expect(getDocument(state, '0')).toEqual({ plugin: 'stateless' })
  })
  -test('insert stateful plugin', () => {
  + test('stateful plugin', () => {
  state = reducer(state, {
  type: ActionType.Insert,
  payload: {
  @@ -53,8 +54,10 @@ test('insert stateful plugin', () => {
  }
  })
  })
  +})
  -test('remove', () => {
  +describe('remove', () => {
  + test('one document', () => {
  state = {
  ...state,
  documents: { '0': { plugin: 'stateless' } }
  @@ -63,7 +66,7 @@ test('remove', () => {
  expect(getDocuments(state)).toEqual({})
  })
  -test('remove one', () => {
  + test('two documents', () => {
  state = {
  ...state,
  documents: { '0': { plugin: 'text' }, '1': { plugin: 'stateless' } }
  @@ -72,12 +75,14 @@ test('remove one', () => {
  expect(getDocuments(state)).toEqual({ '1': { plugin: 'stateless' } })
  })
  -test('remove not existing plugin', () => {
  + test('non-existing document', () => {
  state = reducer(state, { type: ActionType.Remove, payload: '0' })
  expect(getDocuments(state)).toEqual({})
  })
  +})
  -test('change', () => {
  +describe('change', () => {
  + test('whole state', () => {
  state = {
  ...state,
  documents: { '0': { plugin: 'stateful' } }
  @@ -115,7 +120,7 @@ test('shallow change', () => {
  })
  })
  -test('try changing missing plugin', () => {
  + test('non-existing plugin', () => {
  state = reducer(state, {
  type: ActionType.Change,
  payload: {
  @@ -125,3 +130,4 @@ test('try changing missing plugin', () => {
  })
  expect(getDocuments(state)).toEqual({})
  })
  +})
  