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 487B

123456789101112131415161718
  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.isIn('ready')).toBe(true)
  9. })
  10. it('loads file from json', () => {
  11. state.send('LOADED_FROM_FILE', { json: JSON.stringify(json) })
  12. expect(state.isIn('ready')).toBe(true)
  13. expect(state.data.document).toMatchSnapshot('data after mount from file')
  14. })
  15. })