I am trying to open an untitled window from
apm test. Here is what I am trying to do from my test since it works fine from the Chrome DevTools console in Atom:
Unfortunately, it does not appear to succeed when run from my test. I see the following stacktrace and
atom.workspace.getTextEditors().length does not increase as I would expect:
-2015-08-03 23:34:10.031 Atom[46768:1925367] Cannot read property 'pathToOpen' of undefined 2015-08-03 23:34:10.033 Atom[46768:1925367] TypeError: Cannot read property 'pathToOpen' of undefined at AtomApplication.module.exports.AtomApplication.openPath (/Users/mbolin/src/atom/src/browser/atom-application.coffee:585:24) at AtomApplication.<anonymous> (/Users/mbolin/src/atom/src/browser/atom-application.coffee:280:70) at emitNone (events.js:67:13) at AtomApplication.emit (events.js:163:7) at EventEmitter.<anonymous> (/Users/mbolin/src/atom/src/browser/atom-application.coffee:460:24) at emitTwo (events.js:87:13) at EventEmitter.emit (events.js:169:7) at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:86:23) at emitTwo (events.js:87:13) at EventEmitter.emit (events.js:169:7)
Any idea why this doesn’t work? Presumably I need to file a bug, but I’m curious if anyone knows of a current workaround.
It’s good to test with untitled windows because most packages don’t take into account that
TextEditor.getPath() could return