You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

project.test.ts 563B

12345678910111213141516171819
  1. import state from 'state'
  2. import * as json from './__mocks__/document.json'
  3. describe('project', () => {
  4. state.reset()
  5. state.enableLog(true)
  6. it('mounts the state', () => {
  7. state.send('MOUNTED')
  8. expect(state.data.document).toMatchSnapshot('data after initial mount')
  9. expect(state.isIn('ready')).toBe(true)
  10. })
  11. it('loads file from json', () => {
  12. state.send('LOADED_FROM_FILE', { json: JSON.stringify(json) })
  13. expect(state.isIn('ready')).toBe(true)
  14. expect(state.data.document).toMatchSnapshot('data after mount from file')
  15. })
  16. })