       chai.expect(g.nodes.length).to.equal 1
 
   describe 'linear undo/redo', ->
-    g = new graph.Graph
-    j = new journal.Journal(g)
+    g = new noflo.graph.Graph
+    j = new noflo.journal.Journal(g)
     g.addNode 'Foo', 'Bar'
     g.addNode 'Baz', 'Foo'
     g.addEdge 'Foo', 'out', 'Baz', 'in'

  j = null
  describe 'G -> B', ->
    it 'G starts out as A', (done) ->
      graph.loadJSON JSON.parse(A), (err, instance) ->
        return done err if err
        a = instance
        graph.loadJSON JSON.parse(A), (err, instance) ->
          return done err if err
          g = instance
          chai.expect(graph.equivalent(a, g)).to.equal true
          done()
    it 'G and B starts out different', (done) ->
      graph.loadJSON JSON.parse(B), (err, instance) ->
        return done err if err
        b = instance
        chai.expect(graph.equivalent(g, b)).to.equal false
        done()
    it 'merge should make G equivalent to B', (done) ->
      j = new journal.Journal(g)
      g.startTransaction 'merge'
      graph.mergeResolveTheirs g, b
      g.endTransaction 'merge'
      chai.expect(graph.equivalent(g, b)).to.equal true
      done()
    it 'undoing merge should make G equivalent to A again', (done) ->
      j.undo()
      res = graph.equivalent g, a
      chai.expect(res).to.equal true
      done()

# FIXME: add tests for graph.loadJSON/loadFile, and journal metadata


      chai.expect(j.store.lastRevision).to.equal 4

  describe 'pretty printing', ->
    g = new noflo.graph.Graph
    j = new noflo.journal.Journal(g)

    g.startTransaction 'test1'
    g.addNode 'Foo', 'Bar'
