mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-09 00:30:14 +03:00
Use Atom::replicate for second project
This commit is contained in:
parent
3ec2378242
commit
7d87ae00ff
@ -699,11 +699,11 @@ describe "Pane", ->
|
||||
|
||||
it "focuses the pane after attach only if had focus when serialized", ->
|
||||
reloadContainer = ->
|
||||
projectState = project.serialize()
|
||||
projectReplica = atom.replicate().get('project')
|
||||
containerState = container.serialize()
|
||||
container.remove()
|
||||
project.destroy()
|
||||
window.project = deserialize(projectState)
|
||||
window.project = projectReplica
|
||||
container = deserialize(containerState)
|
||||
pane = container.getRoot()
|
||||
container.attachToDom()
|
||||
|
@ -19,7 +19,8 @@ describe "Project", ->
|
||||
it "destroys unretained buffers and does not include them in the serialized state", ->
|
||||
project.bufferForPathSync('a')
|
||||
expect(project.getBuffers().length).toBe 1
|
||||
deserializedProject = deserialize(project.serialize())
|
||||
atom.getWindowState().serializeForPersistence()
|
||||
deserializedProject = atom.replicate().get('project')
|
||||
expect(deserializedProject.getBuffers().length).toBe 0
|
||||
expect(project.getBuffers().length).toBe 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user