-{ expect } = require 'chai'
+expect = require 'expect'
 
 CollabStateMachine = require '../lib/collaboration/collaborationstatemachine'
 

  states.forEach (state) ->
    machine = machineFactoryFn()
    machine.transition state
    expect(machine.state).to.equal state

assertIllegalTransitions = (machineFactoryFn, states) ->
  states.forEach (state) ->

  it 'tests Loading state transitions', ->

    machine = newSimpleMachine()
    expect(machine.state).toEqual 'Loading'

    legalStates = ['NotStarted', 'ErrorLoading', 'Resuming']
    illegalStates = [
