mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-09 17:55:35 +08:00
fix(specs): specs run clean
This commit is contained in:
parent
48cddbbbe6
commit
3d20e272ee
3 changed files with 10 additions and 2 deletions
|
@ -32,6 +32,10 @@ class TestExtension extends DraftStoreExtension
|
|||
describe "DraftStore", ->
|
||||
beforeEach ->
|
||||
spyOn(atom, 'newWindow').andCallFake ->
|
||||
for id, session of DraftStore._draftSessions
|
||||
if session.teardown
|
||||
DraftStore._doneWithSession(session)
|
||||
DraftStore._draftSessions = {}
|
||||
|
||||
describe "creating drafts", ->
|
||||
beforeEach ->
|
||||
|
|
|
@ -61,7 +61,7 @@ class Atom extends Model
|
|||
@getStatePath: ->
|
||||
{isSpec, mainWindow} = @getLoadSettings()
|
||||
if isSpec
|
||||
filename = 'spec'
|
||||
filename = 'spec-saved-state.json'
|
||||
else if mainWindow
|
||||
path.join(@getConfigDirPath(), 'main-window-state.json')
|
||||
else
|
||||
|
|
|
@ -128,7 +128,11 @@ class NylasAPI
|
|||
_onConfigChanged: =>
|
||||
prev = {@AppID, @APIRoot, @APITokens}
|
||||
|
||||
env = atom.config.get('env')
|
||||
if atom.inSpecMode()
|
||||
env = "testing"
|
||||
else
|
||||
env = atom.config.get('env')
|
||||
|
||||
if not env
|
||||
env = 'production'
|
||||
console.error("NylasAPI: config.cson does not contain an environment \
|
||||
|
|
Loading…
Reference in a new issue